vmm: Add virtio-pci device to B/D/F hash table

This table currently contains only all the VFIO devices and it should
really contain all the PCI devices.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-03-18 17:29:23 +00:00
parent fb185fa839
commit 87990f9e67

View File

@ -1695,7 +1695,10 @@ impl DeviceManager {
pci.add_device(pci_device_bdf, virtio_pci_device.clone())
.map_err(DeviceManagerError::AddPciDevice)?;
self.pci_devices.insert(
pci_device_bdf,
Arc::clone(&virtio_pci_device) as Arc<dyn Any + Send + Sync>,
);
self.bus_devices
.push(Arc::clone(&virtio_pci_device) as Arc<Mutex<dyn BusDevice>>);