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/
Home Products Support Community News


[Xen-changelog] [linux-2.6.18-xen] xen: Shouldn't remove device in pci_b

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] xen: Shouldn't remove device in pci_bus_probe_wrapper()
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 07 Nov 2008 17:10:08 -0800
Delivery-date: Fri, 07 Nov 2008 17:09:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1226077460 0
# Node ID d31b6ccf10e41bfc3c1af4b0ff75deb8e2d5b9d8
# Parent  61ab98b5cc0ebf20dd766ec67a84319f058ef6f0
xen: Shouldn't remove device in pci_bus_probe_wrapper()

In pci_bus_probe_wrapper(), it adds (assign) a device to dom0 firstly,
but if pci_bus_probe() for the device fails (don't have driver), the
device will be removed (deassigned) from dom0. For PCIe-to-PCI
bridges, they are removed from dom0 when they are hooked by
pci_bus_probe_wrapper(). That's to say they are not mapped in VT-d
page table. Thus the PCI devices under these bridges cannot work. This
situation happens when install pciback module, because pciback will
probe these bridges and removed them from dom0. Built-in pciback won't
result in this problem due to these bridges (for example 00:1e.0) are
probed before their devices (for example 02:00.0). (When map a pci
device (02:00.0) to VT-d, it will also map its pcie-to-pci bridge
(00:1e.0) to VT-d)

So I think should not remove (deassign) devices from dom0 when
pci_bus_probe() fails. Each device which can DMA should be mapped in
VT-d when VT-d is enabled. But current code make it possible some
these devices are not mapped into VT-d.

From: Weidong Han <weidong.han@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
 drivers/xen/core/pci.c |    8 --------
 1 files changed, 8 deletions(-)

diff -r 61ab98b5cc0e -r d31b6ccf10e4 drivers/xen/core/pci.c
--- a/drivers/xen/core/pci.c    Thu Nov 06 10:29:00 2008 +0000
+++ b/drivers/xen/core/pci.c    Fri Nov 07 17:04:20 2008 +0000
@@ -23,14 +23,6 @@ static int pci_bus_probe_wrapper(struct 
                return r;
        r = pci_bus_probe(dev);
-       if (r) {
-               int ret;
-               ret = HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_remove,
-                                           &manage_pci);
-               WARN_ON(ret && ret != -ENOSYS);
-       }
        return r;

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] xen: Shouldn't remove device in pci_bus_probe_wrapper(), Xen patchbot-linux-2.6.18-xen <=