mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: vm: Implement the Snapshottable trait
By aggregating snapshots from the CpuManager, the MemoryManager and the DeviceManager, Vm implements the snapshot() function from the Snapshottable trait. And by restoring snapshots from the CpuManager, the MemoryManager and the DeviceManager, Vm implements the restore() function from the Snapshottable trait. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
20ba271b6c
commit
1ed357cf34
@@ -4,6 +4,7 @@
|
||||
//
|
||||
|
||||
use crate::config::{HotplugMethod, MemoryConfig};
|
||||
use crate::MEMORY_MANAGER_SNAPSHOT_ID;
|
||||
#[cfg(feature = "acpi")]
|
||||
use acpi_tables::{aml, aml::Aml};
|
||||
use anyhow::anyhow;
|
||||
@@ -930,7 +931,6 @@ pub struct MemoryManagerSnapshotData {
|
||||
memory_regions: Vec<MemoryRegion>,
|
||||
}
|
||||
|
||||
const MEMORY_MANAGER_SNAPSHOT_ID: &str = "memory-manager";
|
||||
impl Snapshottable for MemoryManager {
|
||||
fn id(&self) -> String {
|
||||
MEMORY_MANAGER_SNAPSHOT_ID.to_string()
|
||||
|
||||
Reference in New Issue
Block a user