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 methods
fn freeze_time(&mut self) { ... }
fn thaw_time(&mut self) { ... }
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 freeze_time(&mut self)
fn freeze_time(&mut self)
Freezes backend partition time, if owned and supported by this backend. All VPs have stopped before this is called.
Sourcefn thaw_time(&mut self)
fn thaw_time(&mut self)
Thaws backend partition time before VP execution can start. This must be a no-op for time that is already running.
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.