PCI: add xen dom0 checking before ACS initialization
authorAllen Kay <allen.m.kay@intel.com>
Wed, 7 Oct 2009 17:27:51 +0000 (10:27 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 4 Nov 2009 16:47:26 +0000 (08:47 -0800)
This patch is predicated on Jeremy's patch in include/xen/xen.h.  It'll
prevent ACS init unless the platform has both an IOMMU and we're running
as dom0.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/probe.c

index aac5b156a5c5eeba621819f375b9a032dde1cfbb..bb2cc39b64ffe633de66e2984a3d343f7350276c 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/cpumask.h>
 #include <linux/pci-aspm.h>
 #include <linux/iommu.h>
+#include <xen/xen.h>
 #include "pci.h"
 
 #define CARDBUS_LATENCY_TIMER  176     /* secondary latency timer */
@@ -1007,7 +1008,7 @@ static void pci_init_capabilities(struct pci_dev *dev)
        pci_iov_init(dev);
 
        /* Enable ACS P2P upstream forwarding */
-       if (iommu_found())
+       if (iommu_found() || xen_initial_domain())
                pci_enable_acs(dev);
 }