Skip to main content

VmPartition

Trait VmPartition 

Source
pub trait VmPartition:
    'static
    + Send
    + Sync
    + InspectMut
    + ProtobufSaveRestore {
    // Required methods
    fn initial_vp_state_source(&self) -> InitialVpStateSource;
    fn reset(&mut self) -> Result<()>;
    fn scrub_vtl(&mut self, vtl: Vtl) -> Result<()>;
    fn accept_initial_pages(
        &mut self,
        pages: Vec<InitialPageImport>,
    ) -> Result<()>;

    // Provided method
    fn guest_os_id(&self) -> u64 { ... }
}
Expand description

Trait with the minimal methods needed to run the partition.

Required Methods§

Source

fn initial_vp_state_source(&self) -> InitialVpStateSource

Returns the source of the initial virtual processor state.

Source

fn reset(&mut self) -> Result<()>

Resets the partition.

Source

fn scrub_vtl(&mut self, vtl: Vtl) -> Result<()>

Scrubs the VTL state for a partition.

Source

fn accept_initial_pages(&mut self, pages: Vec<InitialPageImport>) -> Result<()>

Finalizes initial page imports on behalf of the loader.

Provided Methods§

Source

fn guest_os_id(&self) -> u64

Returns the guest OS ID (from HV_X64_MSR_GUEST_OS_ID).

Returns 0 if the guest hasn’t written the MSR (unenlightened guest) or if the backend doesn’t support reading it.

Implementors§