WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] qemu: pci_scan everytime we register a device

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] qemu: pci_scan everytime we register a device
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Fri, 20 Nov 2009 15:46:13 +0000
Delivery-date: Fri, 20 Nov 2009 07:44:03 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
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 <stefano.stabellini@xxxxxxxxxxxxx>

---

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,

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] qemu: pci_scan everytime we register a device, Stefano Stabellini <=