mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: mem: Add snapshot/restore support
Adding the snapshot/restore support along with migration as well, allowing a VM with virtio-mem devices attached to be properly migrated. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
@@ -698,11 +698,12 @@ impl MemoryManager {
|
||||
|
||||
virtio_mem_regions.push(region.clone());
|
||||
|
||||
let hotplugged_size = zone.hotplugged_size.unwrap_or(0);
|
||||
memory_zone.virtio_mem_zone = Some(VirtioMemZone {
|
||||
region,
|
||||
resize_handler: virtio_devices::Resize::new()
|
||||
resize_handler: virtio_devices::Resize::new(hotplugged_size)
|
||||
.map_err(Error::EventFdFail)?,
|
||||
hotplugged_size: zone.hotplugged_size.unwrap_or(0),
|
||||
hotplugged_size,
|
||||
hugepages: zone.hugepages,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user