From 87990f9e67edd2b0ffc7887dccc86fa97da26fd7 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 18 Mar 2020 17:29:23 +0000 Subject: [PATCH] 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 --- 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 068bcf268..9f2ae09e1 100644 --- a/vmm/src/device_manager.rs +++ b/vmm/src/device_manager.rs @@ -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, + ); self.bus_devices .push(Arc::clone(&virtio_pci_device) as Arc>);