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 <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2020-04-20 19:35:16 +02:00
parent c2abadc293
commit 18f7789a81

View File

@ -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(),