From eac350c4549cb22f54e8e2ad9002ad25f2e04a1c Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Mon, 27 Apr 2020 10:31:59 +0200 Subject: [PATCH] vmm: Add an identifier to the virtio-mem device This will be later used to identify each device used by the VM in order to perform introspection and snapshot/restore properly. Signed-off-by: Sebastien Boeuf --- vmm/src/device_manager.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vmm/src/device_manager.rs b/vmm/src/device_manager.rs index d83391f86..ff152812b 100644 --- a/vmm/src/device_manager.rs +++ b/vmm/src/device_manager.rs @@ -75,6 +75,7 @@ const VFIO_DEVICE_NAME_PREFIX: &str = "vfio"; const DISK_DEVICE_NAME_PREFIX: &str = "disk"; const FS_DEVICE_NAME_PREFIX: &str = "fs"; +const MEM_DEVICE_NAME: &str = "mem"; const NET_DEVICE_NAME_PREFIX: &str = "net"; const PMEM_DEVICE_NAME_PREFIX: &str = "pmem"; const RNG_DEVICE_NAME: &str = "rng"; @@ -1725,7 +1726,7 @@ impl DeviceManager { devices.push(( Arc::clone(&virtio_mem_device) as VirtioDeviceArc, false, - None, + Some(String::from(MEM_DEVICE_NAME)), )); let migratable = Arc::clone(&virtio_mem_device) as Arc>;