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] RE: [Xen-changelog] [xen-unstable] passthrough/stubdom: clea

To: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Subject: [Xen-devel] RE: [Xen-changelog] [xen-unstable] passthrough/stubdom: clean up hypercall privilege checking
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Mon, 26 Oct 2009 11:49:38 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Mon, 26 Oct 2009 04:48:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <EADF0A36011179459010BDF5142A457501CED06119@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <200910230940.n9N9eDXX016166@xxxxxxxxxxxxxxxxxxxxx> <EADF0A36011179459010BDF5142A457501CED06119@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Mon, 26 Oct 2009, Cui, Dexuan wrote:
> Hi Stefano,
> Looks after your patchset to enable passthrough for stubdomain was checked 
> in, guest hotplug (at least for hvm guest in the non-stubdomain case) is 
> broken, e.g., multiple times of "xm pci-attach/pci-detach" would fail.  Can 
> you try that?
> 

I tried several times and I only had problems with one particular device
for which the find_parent() function returns None therefore breaking the
following code in find_all_the_multi_functions().
This patch fixes it.
However I doubt that this bug is related to the problem you are seeing,
it would probably help if you could post xend and qemu logs.

---

diff -r 8ca4e32583b6 tools/python/xen/util/pci.py
--- a/tools/python/xen/util/pci.py      Fri Oct 23 10:15:17 2009 +0100
+++ b/tools/python/xen/util/pci.py      Mon Oct 26 11:46:38 2009 +0000
@@ -830,7 +830,10 @@
 
     def find_all_the_multi_functions(self):
         sysfs_mnt = find_sysfs_mnt()
-        parent = pci_dict_to_bdf_str(self.find_parent())
+        parentdict = self.find_parent()
+        if parentdict is None :
+            return [ self.name ]
+        parent = pci_dict_to_bdf_str(parentdict)
         pci_names = os.popen('ls ' + sysfs_mnt + SYSFS_PCI_DEVS_PATH + '/' + \
             parent + '/').read()
         funcs = extract_the_exact_pci_names(pci_names)

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

<Prev in Thread] Current Thread [Next in Thread>