Struct IgvmVtlLoader

Source
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>

Source

pub fn loader(&self) -> &IgvmLoader<R>

Source

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.

Source

pub fn take_vp_context(&mut self) -> Vec<u8>

Trait Implementations§

Source§

impl<R: IgvmLoaderRegister + GuestArch + 'static> ImageLoad<R> for IgvmVtlLoader<'_, R>

Source§

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>

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>

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<()>

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<()>

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<()>

Import a register into the BSP.
Source§

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<()>

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<()>

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<()>

Specify a region as relocatable page table memory.
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more