pub struct Loader<'a, R> { /* private fields */ }
Implementations§
Source§impl<R> Loader<'_, R>
impl<R> Loader<'_, R>
pub fn new( gm: GuestMemory, mem_layout: &MemoryLayout, max_vtl: Vtl, ) -> Loader<'_, R>
pub fn initial_regs(self) -> Vec<R>
pub fn initial_regs_and_accepted_ranges( self, ) -> (Vec<R>, Vec<(MemoryRange, PageVisibility)>)
Sourcepub fn accept_new_range(
&mut self,
page_base: u64,
page_count: u64,
tag: &str,
acceptance: BootPageAcceptance,
) -> Result<()>
pub fn accept_new_range( &mut self, page_base: u64, page_count: u64, tag: &str, acceptance: BootPageAcceptance, ) -> Result<()>
Accept a new page range with a given acceptance into the map of accepted ranges.
Trait Implementations§
Source§impl<R: Debug + GuestArch> ImageLoad<R> for Loader<'_, R>
impl<R: Debug + GuestArch> ImageLoad<R> for Loader<'_, R>
Source§fn isolation_config(&self) -> IsolationConfig
fn isolation_config(&self) -> IsolationConfig
Get the isolation configuration for this loader. This can be used by loaders
to load different state depending on the platform.
Source§fn import_pages(
&mut self,
page_base: u64,
page_count: u64,
debug_tag: &str,
acceptance: BootPageAcceptance,
data: &[u8],
) -> Result<()>
fn import_pages( &mut self, page_base: u64, page_count: u64, debug_tag: &str, acceptance: BootPageAcceptance, data: &[u8], ) -> Result<()>
Import data into the guest address space with the given acceptance type.
data.len() must be smaller than or equal to the number of pages being imported. Read more
Source§fn import_vp_register(&mut self, register: R) -> Result<()>
fn import_vp_register(&mut self, register: R) -> Result<()>
Import a register into the BSP.
Source§fn verify_startup_memory_available(
&mut self,
page_base: u64,
page_count: u64,
memory_type: StartupMemoryType,
) -> Result<()>
fn verify_startup_memory_available( &mut self, page_base: u64, page_count: u64, memory_type: StartupMemoryType, ) -> Result<()>
Verify with the loader that memory is available in guest address space with the given type.
Source§fn set_vp_context_page(&mut self, _page_base: u64) -> Result<()>
fn set_vp_context_page(&mut self, _page_base: u64) -> Result<()>
Notify the loader to deposit architecture specific VP context information at the given page. Read more
Source§fn create_parameter_area(
&mut self,
_page_base: u64,
_page_count: u32,
_debug_tag: &str,
) -> Result<ParameterAreaIndex>
fn create_parameter_area( &mut self, _page_base: u64, _page_count: u32, _debug_tag: &str, ) -> Result<ParameterAreaIndex>
Create a parameter area for the given page_base and page_count, which
can be used to import parameters. Read more
Source§fn create_parameter_area_with_data(
&mut self,
_page_base: u64,
_page_count: u32,
_debug_tag: &str,
_initial_data: &[u8],
) -> Result<ParameterAreaIndex>
fn create_parameter_area_with_data( &mut self, _page_base: u64, _page_count: u32, _debug_tag: &str, _initial_data: &[u8], ) -> Result<ParameterAreaIndex>
Create a parameter area for the given page_base, page_count, and initial_data
which can be used to import parameters. Read more
Source§fn import_parameter(
&mut self,
_parameter_area: ParameterAreaIndex,
_byte_offset: u32,
_parameter_type: IgvmParameterType,
) -> Result<()>
fn import_parameter( &mut self, _parameter_area: ParameterAreaIndex, _byte_offset: u32, _parameter_type: IgvmParameterType, ) -> Result<()>
Import an IGVM parameter into the given parameter area index at the given offset. Read more
Source§fn relocation_region(
&mut self,
_gpa: u64,
_size_bytes: u64,
_relocation_alignment: u64,
_minimum_relocation_gpa: u64,
_maximum_relocation_gpa: u64,
_apply_rip_offset: bool,
_apply_gdtr_offset: bool,
_vp_index: u16,
) -> Result<()>
fn relocation_region( &mut self, _gpa: u64, _size_bytes: u64, _relocation_alignment: u64, _minimum_relocation_gpa: u64, _maximum_relocation_gpa: u64, _apply_rip_offset: bool, _apply_gdtr_offset: bool, _vp_index: u16, ) -> Result<()>
Specify this region as relocatable.
Source§fn page_table_relocation(
&mut self,
_page_table_gpa: u64,
_size_pages: u64,
_used_pages: u64,
_vp_index: u16,
) -> Result<()>
fn page_table_relocation( &mut self, _page_table_gpa: u64, _size_pages: u64, _used_pages: u64, _vp_index: u16, ) -> Result<()>
Specify a region as relocatable page table memory.
Source§fn set_imported_regions_config_page(&mut self, _page_base: u64)
fn set_imported_regions_config_page(&mut self, _page_base: u64)
Lets the loader know what the base page of where the config page
containing list of accepted regions should be. This list should contain
the pages that will be accepted by the loader and therefore should not
be accepted again by either the boot shim or the vtl 2 firmware. The
list will be sorted in ascending order (on the base page) and be an
array of non-overlapping
[
loader_defs::paravisor::ImportedRegionDescriptor
]. A
[loader_defs::paravisor::ImportedRegionDescriptor
] with a page count
of 0 indicates the end of the list.Auto Trait Implementations§
impl<'a, R> Freeze for Loader<'a, R>
impl<'a, R> !RefUnwindSafe for Loader<'a, R>
impl<'a, R> Send for Loader<'a, R>where
R: Send,
impl<'a, R> Sync for Loader<'a, R>where
R: Sync,
impl<'a, R> Unpin for Loader<'a, R>where
R: Unpin,
impl<'a, R> !UnwindSafe for Loader<'a, R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more