From: Stefano Stabellini Subject: [PATCH] qemu: pci_scan everytime we register a device Date: Fri, 20 Nov 2009 15:46:13 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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. Signed-off-by: Stefano Stabellini --- diff --git a/hw/pass-through.c b/hw/pass-through.c index cdf0f31..946f460 100644 --- a/hw/pass-through.c +++ b/hw/pass-through.c @@ -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,