pub struct IgvmVtlLoader<'a, R: VbsRegister + GuestArch> {
loader: &'a mut IgvmLoader<R>,
vtl: Vtl,
vp_context: Option<VbsVpContext<R>>,
}
Fields§
§loader: &'a mut IgvmLoader<R>
§vtl: Vtl
§vp_context: Option<VbsVpContext<R>>
Implementations§
Source§impl<R: VbsRegister + GuestArch> IgvmVtlLoader<'_, R>
impl<R: VbsRegister + GuestArch> IgvmVtlLoader<'_, R>
pub fn loader(&self) -> &IgvmLoader<R>
Sourcepub fn nested_loader(&mut self) -> IgvmVtlLoader<'_, R>
pub fn nested_loader(&mut self) -> IgvmVtlLoader<'_, R>
Returns a loader for importing an inner image as part of the actual (paravisor) image to load.
Use take_vp_context
on the returned loader to get the VP context that
the paravisor should load.
pub fn take_vp_context(&mut self) -> Vec<u8> ⓘ
Trait Implementations§
Source§impl<R: IgvmLoaderRegister + GuestArch + 'static> ImageLoad<R> for IgvmVtlLoader<'_, R>
impl<R: IgvmLoaderRegister + GuestArch + 'static> ImageLoad<R> for IgvmVtlLoader<'_, 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 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 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 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_size_pages: u64,
vp_index: u16,
) -> Result<()>
fn page_table_relocation( &mut self, page_table_gpa: u64, size_pages: u64, used_size_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 IgvmVtlLoader<'a, R>
impl<'a, R> !RefUnwindSafe for IgvmVtlLoader<'a, R>
impl<'a, R> !Send for IgvmVtlLoader<'a, R>
impl<'a, R> !Sync for IgvmVtlLoader<'a, R>
impl<'a, R> Unpin for IgvmVtlLoader<'a, R>where
R: Unpin,
impl<'a, R> !UnwindSafe for IgvmVtlLoader<'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