From 75ddd2a244bfab64085908d6199e53b957eaa64a Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Mon, 27 Apr 2020 13:19:19 +0200 Subject: [PATCH] vmm: Add an identifier to the --console 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 ff152812b..93a68ca50 100644 --- a/vmm/src/device_manager.rs +++ b/vmm/src/device_manager.rs @@ -73,6 +73,7 @@ const MMIO_LEN: u64 = 0x1000; #[cfg(feature = "pci_support")] const VFIO_DEVICE_NAME_PREFIX: &str = "vfio"; +const CONSOLE_DEVICE_NAME: &str = "console"; const DISK_DEVICE_NAME_PREFIX: &str = "disk"; const FS_DEVICE_NAME_PREFIX: &str = "fs"; const MEM_DEVICE_NAME: &str = "mem"; @@ -1100,7 +1101,7 @@ impl DeviceManager { virtio_devices.push(( Arc::new(Mutex::new(virtio_console_device)) as VirtioDeviceArc, console_config.iommu, - None, + Some(String::from(CONSOLE_DEVICE_NAME)), )); Some(console_input) } else {