]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen/x86: do the PCI scan unconditionally
authorRoger Pau Monne <roger.pau@citrix.com>
Fri, 28 Oct 2016 09:16:40 +0000 (11:16 +0200)
committerRoger Pau Monne <roger.pau@citrix.com>
Wed, 2 Nov 2016 17:34:49 +0000 (18:34 +0100)
Instead of being tied to the presence of an IOMMU. This avoids doing the
scan in two different places, and although it's only required for PVHv2
guests (that also require and IOMMU), it makes the code slightly easier to
follow.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Kevin Tian <kevin.tian@intel.com>
Cc: Feng Wu <feng.wu@intel.com>
---
Changes since v2:
 - Expand the commit message.

xen/arch/x86/setup.c
xen/drivers/passthrough/amd/pci_amd_iommu.c
xen/drivers/passthrough/vtd/iommu.c

index b13067132d29d7eeecee1eac08f3b6a327d9a177..72e7f24c1543dd5f9cea12fb7691937fbb543646 100644 (file)
@@ -1491,6 +1491,8 @@ void __init noreturn __start_xen(unsigned long mbi_p)
 
     early_msi_init();
 
+    scan_pci_devices();
+
     iommu_setup();    /* setup iommu if available */
 
     smp_prepare_cpus(max_cpus);
index 94a25a4d8d9c5762ec1b39d8b4231c2687088dff..d12575dc3d785281e9a836691960140e65540f35 100644 (file)
@@ -219,7 +219,8 @@ int __init amd_iov_detect(void)
 
     if ( !amd_iommu_perdev_intremap )
         printk(XENLOG_WARNING "AMD-Vi: Using global interrupt remap table is not recommended (see XSA-36)!\n");
-    return scan_pci_devices();
+
+    return 0;
 }
 
 static int allocate_domain_resources(struct domain_iommu *hd)
index 48f120b13c3f4f4957083161226c66520695f4ad..919993eaf4c857d2466b9082493769ff26d080e4 100644 (file)
@@ -2299,8 +2299,6 @@ int __init intel_vtd_setup(void)
     P(iommu_hap_pt_share, "Shared EPT tables");
 #undef P
 
-    scan_pci_devices();
-
     ret = init_vtd_hw();
     if ( ret )
         goto error;