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§
Sourcefn initial_vp_state_source(&self) -> InitialVpStateSource
fn initial_vp_state_source(&self) -> InitialVpStateSource
Returns the source of the initial virtual processor state.
Sourcefn accept_initial_pages(&mut self, pages: Vec<InitialPageImport>) -> Result<()>
fn accept_initial_pages(&mut self, pages: Vec<InitialPageImport>) -> Result<()>
Finalizes initial page imports on behalf of the loader.
Provided Methods§
Sourcefn guest_os_id(&self) -> u64
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.