All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhai, Edwin" <edwin.zhai@intel.com>
To: Xen Developers <xen-devel@lists.xensource.com>
Cc: "Zhai, Edwin" <edwin.zhai@intel.com>
Subject: [PATCH] [Xend] Fix HVM PCI hot removal failure
Date: Tue, 28 Apr 2009 15:34:01 +0800	[thread overview]
Message-ID: <49F6B169.2090909@intel.com> (raw)

[-- 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

             reply	other threads:[~2009-04-28  7:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-28  7:34 Zhai, Edwin [this message]
2009-04-28  7:52 ` [PATCH] [Xend] Fix HVM PCI hot removal failure 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49F6B169.2090909@intel.com \
    --to=edwin.zhai@intel.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.