Trait virt::x86::vm::AccessVmState
source · pub trait AccessVmState {
type Error: 'static + Error + Send + Sync;
Show 13 methods
// Required methods
fn caps(&self) -> &X86PartitionCapabilities;
fn commit(&mut self) -> Result<(), Self::Error>;
fn hypercall(&mut self) -> Result<HypercallMsrs, Self::Error>;
fn set_hypercall(
&mut self,
value: &HypercallMsrs,
) -> Result<(), Self::Error>;
fn reftime(&mut self) -> Result<ReferenceTime, Self::Error>;
fn set_reftime(&mut self, value: &ReferenceTime) -> Result<(), Self::Error>;
fn reference_tsc_page(&mut self) -> Result<ReferenceTscPage, Self::Error>;
fn set_reference_tsc_page(
&mut self,
value: &ReferenceTscPage,
) -> Result<(), Self::Error>;
// Provided methods
fn save_all(&mut self) -> Result<VmSavedState, StateError<Self::Error>> { ... }
fn restore_all(
&mut self,
state: &VmSavedState,
) -> Result<(), StateError<Self::Error>> { ... }
fn reset_all(
&mut self,
vp_info: &X86VpInfo,
) -> Result<(), StateError<Self::Error>> { ... }
fn check_reset_all(&mut self, vp_info: &X86VpInfo) { ... }
fn inspect_all(&mut self, req: Request<'_>) { ... }
}
Expand description
Access to per-VM state.
Required Associated Types§
Required Methods§
sourcefn caps(&self) -> &X86PartitionCapabilities
fn caps(&self) -> &X86PartitionCapabilities
Gets the partition’s capabilities.
sourcefn commit(&mut self) -> Result<(), Self::Error>
fn commit(&mut self) -> Result<(), Self::Error>
Commits any state changes made with the set_*
methods.
sourcefn hypercall(&mut self) -> Result<HypercallMsrs, Self::Error>
fn hypercall(&mut self) -> Result<HypercallMsrs, Self::Error>
Gets the specified state.
sourcefn set_hypercall(&mut self, value: &HypercallMsrs) -> Result<(), Self::Error>
fn set_hypercall(&mut self, value: &HypercallMsrs) -> Result<(), Self::Error>
Sets the specified state.
sourcefn reftime(&mut self) -> Result<ReferenceTime, Self::Error>
fn reftime(&mut self) -> Result<ReferenceTime, Self::Error>
Gets the specified state.
sourcefn set_reftime(&mut self, value: &ReferenceTime) -> Result<(), Self::Error>
fn set_reftime(&mut self, value: &ReferenceTime) -> Result<(), Self::Error>
Sets the specified state.
sourcefn reference_tsc_page(&mut self) -> Result<ReferenceTscPage, Self::Error>
fn reference_tsc_page(&mut self) -> Result<ReferenceTscPage, Self::Error>
Gets the specified state.
sourcefn set_reference_tsc_page(
&mut self,
value: &ReferenceTscPage,
) -> Result<(), Self::Error>
fn set_reference_tsc_page( &mut self, value: &ReferenceTscPage, ) -> Result<(), Self::Error>
Sets the specified state.
Provided Methods§
sourcefn save_all(&mut self) -> Result<VmSavedState, StateError<Self::Error>>
fn save_all(&mut self) -> Result<VmSavedState, StateError<Self::Error>>
Save all state that can be restored by a call to restore.
sourcefn restore_all(
&mut self,
state: &VmSavedState,
) -> Result<(), StateError<Self::Error>>
fn restore_all( &mut self, state: &VmSavedState, ) -> Result<(), StateError<Self::Error>>
Restore state elements saved in save state.
sourcefn reset_all(
&mut self,
vp_info: &X86VpInfo,
) -> Result<(), StateError<Self::Error>>
fn reset_all( &mut self, vp_info: &X86VpInfo, ) -> Result<(), StateError<Self::Error>>
Resets all the state elements to their initial state (after machine reset).
sourcefn check_reset_all(&mut self, vp_info: &X86VpInfo)
fn check_reset_all(&mut self, vp_info: &X86VpInfo)
Validates that all state elements are in their initial state (after machine reset).