From e4386c8bb72fcfa734a7ce96da6dc4a54a24e99b Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Mon, 27 Apr 2020 14:44:16 +0200 Subject: [PATCH] vmm: Add an identifier to the virtio-iommu 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vmm/src/device_manager.rs b/vmm/src/device_manager.rs index 93a68ca50..790a28251 100644 --- a/vmm/src/device_manager.rs +++ b/vmm/src/device_manager.rs @@ -82,6 +82,9 @@ const PMEM_DEVICE_NAME_PREFIX: &str = "pmem"; const RNG_DEVICE_NAME: &str = "rng"; const VSOCK_DEVICE_NAME_PREFIX: &str = "vsock"; +#[cfg(feature = "pci_support")] +const IOMMU_DEVICE_NAME: &str = "iommu"; + /// Errors associated with device manager #[derive(Debug)] pub enum DeviceManagerError { @@ -839,7 +842,7 @@ impl DeviceManager { &mut pci_bus, &None, &interrupt_manager, - None, + Some(String::from(IOMMU_DEVICE_NAME)), )?; }