From 18f7789a8158c476dd599f95bab3eedadd8d50aa Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Mon, 20 Apr 2020 19:35:16 +0200 Subject: [PATCH] vmm: Add hotplugged virtio devices to the DeviceManager list The hotplugged virtio devices were not added to the list of virtio devices from the DeviceManager. This patch fixes it, as it was causing hotplugged virtio-fs devices from not supporting memory hotplug, since they were never getting the update as they were not part of the list of virtio devices held by the DeviceManager. Signed-off-by: Sebastien Boeuf --- vmm/src/device_manager.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vmm/src/device_manager.rs b/vmm/src/device_manager.rs index 0812b613f..96b93c8ed 100644 --- a/vmm/src/device_manager.rs +++ b/vmm/src/device_manager.rs @@ -2235,6 +2235,12 @@ impl DeviceManager { let interrupt_manager = Arc::clone(&self.msi_interrupt_manager); + // Add the virtio device to the device manager list. This is important + // as the list is used to notify virtio devices about memory updates + // for instance. + self.virtio_devices + .push((device.clone(), iommu_attached, id.clone())); + let device_id = self.add_virtio_pci_device( device, &mut pci.lock().unwrap(),