All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [Xend] Fix HVM PCI hot removal failure
@ 2009-04-28  7:34 Zhai, Edwin
  2009-04-28  7:52 ` Keir Fraser
  0 siblings, 1 reply; 15+ messages in thread
From: Zhai, Edwin @ 2009-04-28  7:34 UTC (permalink / raw)
  To: Xen Developers; +Cc: Zhai, Edwin

[-- Attachment #1: Type: text/plain, Size: 162 bytes --]

Fix a bug of HVM PCI hot removal failure introduced in r19573.
xend's deassign_device should not be called for HVM, as qemu already do so.

-- 
best rgds,
edwin


[-- Attachment #2: pci_hot_removal_fix.patch --]
[-- Type: text/plain, Size: 1240 bytes --]

Index: hv/tools/python/xen/xend/server/pciif.py
===================================================================
--- hv.orig/tools/python/xen/xend/server/pciif.py
+++ hv/tools/python/xen/xend/server/pciif.py
@@ -493,12 +493,14 @@ class PciController(DevController):
         # DMA transaction, etc
         dev.do_FLR()
 
-        pci_str = "0x%x, 0x%x, 0x%x, 0x%x" % (domain, bus, slot, func)
-        bdf = xc.deassign_device(fe_domid, pci_str)
-        if bdf > 0:
-            raise VmError("Failed to deassign device from IOMMU (%x:%x.%x)"
-                          % (bus, slot, func))
-        log.debug("pci: Deassign device %x:%x.%x" % (bus, slot, func))
+        # qemu would do following in case of HVM
+        if not self.vm.info.is_hvm():
+            pci_str = "0x%x, 0x%x, 0x%x, 0x%x" % (domain, bus, slot, func)
+            bdf = xc.deassign_device(fe_domid, pci_str)
+            if bdf > 0:
+                raise VmError("Failed to deassign device from IOMMU (%x:%x.%x)"
+                              % (bus, slot, func))
+            log.debug("pci: Deassign device %x:%x.%x" % (bus, slot, func))
 
         for (start, size) in dev.ioports:
             log.debug('pci: disabling ioport 0x%x/0x%x'%(start,size))

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-05-07 18:17 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-28  7:34 [PATCH] [Xend] Fix HVM PCI hot removal failure Zhai, Edwin
2009-04-28  7:52 ` Keir Fraser
2009-04-28  8:18   ` Zhai, Edwin
2009-04-28  9:17     ` Keir Fraser
2009-04-28  9:33       ` Zhai, Edwin
2009-04-28 10:38         ` Stefano Stabellini
2009-04-29 15:41           ` Repositories and build system Ian Jackson
2009-04-29 16:38             ` Dan Magenheimer
2009-04-29 16:56               ` Ian Jackson
2009-04-29 17:40                 ` Dan Magenheimer
2009-04-29 18:06                   ` Keir Fraser
2009-05-07 16:51                   ` Stefano Stabellini
2009-05-07 17:00                     ` Brendan Cully
2009-05-07 18:17                       ` Keir Fraser
2009-04-28 12:17         ` [PATCH] [Xend] Fix HVM PCI hot removal failure Keir Fraser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.