Struct IgvmLoader

Source
pub struct IgvmLoader<R: VbsRegister + GuestArch> {
Show 14 fields accepted_ranges: RangeMap<u64, RangeInfo>, relocatable_regions: RangeMap<u64, RelocationType>, required_memory: Vec<RequiredMemory>, page_table_region: Option<PageTableRegion>, platform_header: IgvmPlatformHeader, initialization_headers: Vec<IgvmInitializationHeader>, directives: Vec<IgvmDirectiveHeader>, page_data_directives: Vec<IgvmDirectiveHeader>, vp_context: Option<Box<dyn VpContextBuilder<Register = R>>>, max_vtl: Vtl, parameter_areas: BTreeMap<(u64, u32), u32>, isolation_type: LoaderIsolationType, paravisor_present: bool, imported_regions_config_page: Option<u64>,
}

Fields§

§accepted_ranges: RangeMap<u64, RangeInfo>§relocatable_regions: RangeMap<u64, RelocationType>§required_memory: Vec<RequiredMemory>§page_table_region: Option<PageTableRegion>§platform_header: IgvmPlatformHeader§initialization_headers: Vec<IgvmInitializationHeader>§directives: Vec<IgvmDirectiveHeader>§page_data_directives: Vec<IgvmDirectiveHeader>§vp_context: Option<Box<dyn VpContextBuilder<Register = R>>>§max_vtl: Vtl§parameter_areas: BTreeMap<(u64, u32), u32>§isolation_type: LoaderIsolationType§paravisor_present: bool§imported_regions_config_page: Option<u64>

Implementations§

Source§

impl<R: IgvmLoaderRegister + GuestArch + 'static> IgvmLoader<R>

Source

pub fn new(with_paravisor: bool, isolation_type: LoaderIsolationType) -> Self

Source

fn generate_cryptographic_hash_of_shared_pages(&mut self) -> Vec<u8>

Source

pub fn finalize(self, guest_svn: u32) -> Result<IgvmOutput>

Finalize the loader state, returning an IGVM file.

Source

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.

Source

fn imported_regions(&self) -> Vec<ImportedRegionDescriptor>

Source

pub fn arch(&self) -> GuestArchKind

The guest architecture used by this loader.

Source

pub fn confidential_debug(&self) -> bool

Returns true if this is an isolated guest with debug enabled, false otherwise.

Source

pub fn loader(&mut self) -> IgvmVtlLoader<'_, R>

Source

fn import_pages( &mut self, page_base: u64, page_count: u64, debug_tag: &str, acceptance: BootPageAcceptance, data: &[u8], ) -> Result<(), Error>

Auto Trait Implementations§

§

impl<R> Freeze for IgvmLoader<R>

§

impl<R> !RefUnwindSafe for IgvmLoader<R>

§

impl<R> !Send for IgvmLoader<R>

§

impl<R> !Sync for IgvmLoader<R>

§

impl<R> Unpin for IgvmLoader<R>

§

impl<R> !UnwindSafe for IgvmLoader<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