pub struct MicrovmState {
pub vm_info: VmInfo,
pub vcpu_states: Vec<VcpuState>,
pub device_states: DeviceStates,
pub gic_state: GicState,
pub mmds_state: Option<MmdsState>,
}Expand description
The snapshot state blob — the data field of crate::envelope::Snapshot.
Pin per 10-data-model.md § 5.
Fields§
§vm_info: VmInfoTop-level VM info.
vcpu_states: Vec<VcpuState>One per vCPU.
device_states: DeviceStatesPer-device state.
gic_state: GicStateOpaque GIC blob.
mmds_state: Option<MmdsState>MMDS state if MMDS was enabled.
Implementations§
Source§impl MicrovmState
impl MicrovmState
Sourcepub fn verify_compatible(&self) -> Result<(), SnapshotError>
pub fn verify_compatible(&self) -> Result<(), SnapshotError>
Squib-incompat sanity check — surfaces SnapshotError::Incompatible when
the loaded state could not have come from a squib-shaped VMM.
Used by the loader after a successful magic + CRC + version check to give
--describe-snapshot a clean rejection of e.g. KVM-produced state files
that happen to deserialise structurally (D10).
§Errors
SnapshotError::Incompatible if any structural invariant is violated.
Trait Implementations§
Source§impl Clone for MicrovmState
impl Clone for MicrovmState
Source§fn clone(&self) -> MicrovmState
fn clone(&self) -> MicrovmState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MicrovmState
impl Debug for MicrovmState
Source§impl Default for MicrovmState
impl Default for MicrovmState
Source§fn default() -> MicrovmState
fn default() -> MicrovmState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MicrovmState
impl<'de> Deserialize<'de> for MicrovmState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MicrovmState
impl PartialEq for MicrovmState
Source§fn eq(&self, other: &MicrovmState) -> bool
fn eq(&self, other: &MicrovmState) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MicrovmState
impl Serialize for MicrovmState
impl StructuralPartialEq for MicrovmState
Auto Trait Implementations§
impl Freeze for MicrovmState
impl RefUnwindSafe for MicrovmState
impl Send for MicrovmState
impl Sync for MicrovmState
impl Unpin for MicrovmState
impl UnsafeUnpin for MicrovmState
impl UnwindSafe for MicrovmState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more