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] xend: passthrough: fix physdev_map_pirq invocation

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] xend: passthrough: fix physdev_map_pirq invocation
From: Qing He <qing.he@xxxxxxxxx>
Date: Fri, 4 Sep 2009 17:29:34 +0800
Delivery-date: Fri, 04 Sep 2009 02:25:46 -0700
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: Mutt/1.5.17+20080114 (2008-01-14)
For those devices not having INTx (like VFs), avoid calling map_pirq,
otherwise the guest cannot be started successfully.

Also avoid calling this hypercall for hvm guest, this is done in the
device model.

Signed-off-by: Qing He <qing.he@xxxxxxxxx>

---
 pciif.py |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)


diff -r 8f81bdd57afe tools/python/xen/xend/server/pciif.py
--- a/tools/python/xen/xend/server/pciif.py     Thu Sep 03 09:51:37 2009 +0100
+++ b/tools/python/xen/xend/server/pciif.py     Fri Sep 04 17:24:32 2009 +0800
@@ -345,12 +345,13 @@ class PciController(DevController):
                 if rc<0:
                     raise VmError(('pci: failed to remove msi-x iomem'))
 
-        rc = xc.physdev_map_pirq(domid = fe_domid,
-                               index = dev.irq,
-                               pirq  = dev.irq)
-        if rc < 0:
-            raise VmError(('pci: failed to map irq on device '+
-                        '%s - errno=%d')%(dev.name,rc))
+        if not self.vm.info.is_hvm() and dev.irq:
+            rc = xc.physdev_map_pirq(domid = fe_domid,
+                                   index = dev.irq,
+                                   pirq  = dev.irq)
+            if rc < 0:
+                raise VmError(('pci: failed to map irq on device '+
+                            '%s - errno=%d')%(dev.name,rc))
         if dev.irq>0:
             log.debug('pci: enabling irq %d'%dev.irq)
             rc = xc.domain_irq_permission(domid =  fe_domid, pirq = dev.irq,

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xend: passthrough: fix physdev_map_pirq invocation, Qing He <=