Skip to contentSkip to conversation

qemu: pci_scan everytime we register a device

PATCH New Stefano Stabellini 1 participant 1 message Nov 20, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu: pci_scan everytime we register a device

Hi all,
when using stubdoms the pci devices visible when issuing a pci_scan change dynamically with the devices that are actually assigned to the stubdom. For this reason every time we want to assign a new device to the guest we need to rescan the pci bus.

---

hw/pass-through.c +1 -1
index cdf0f31..946f460 100644
@@ -4431,9 +4431,9 @@ int power_on_php_devfn(int devfn)
             return -1;
         }
         pci_init(pci_access);
-        pci_scan_bus(pci_access);
         dpci_infos.pci_access = pci_access;
     }
+    pci_scan_bus(dpci_infos.pci_access);
 
     pt_dev =
         register_real_device(dpci_infos.e_bus,