[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xend: passthrough: fix physdev_map_pirq invocation



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1252309119 -3600
# Node ID b5cb195b737bb7747c66f74780bf3196fa30e9d5
# Parent  49b561416efca3b5ebe143ce6349f892f249b5f4
xend: passthrough: fix physdev_map_pirq invocation

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>
---
 tools/python/xen/xend/server/pciif.py |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff -r 49b561416efc -r b5cb195b737b tools/python/xen/xend/server/pciif.py
--- a/tools/python/xen/xend/server/pciif.py     Mon Sep 07 08:37:58 2009 +0100
+++ b/tools/python/xen/xend/server/pciif.py     Mon Sep 07 08:38:39 2009 +0100
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.