]> xenbits.xensource.com Git - xen.git/commitdiff
vtd: refuse to enable IOMMU if the PCI scan fails
authorRoger Pau Monné <roger.pau@citrix.com>
Fri, 2 Dec 2016 17:09:11 +0000 (18:09 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 2 Dec 2016 17:09:11 +0000 (18:09 +0100)
This provides uniform behavior between Intel and AMD IOMMU initialization, and
is a requirement for PVHv2 Dom0, that depends on a working IOMMU plus the PCI
bus being scanned for devices.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/drivers/passthrough/vtd/iommu.c

index 48f120b13c3f4f4957083161226c66520695f4ad..78b5a6ac02b956f5e7bb46116b3cd741cb7e7a23 100644 (file)
@@ -2299,7 +2299,9 @@ int __init intel_vtd_setup(void)
     P(iommu_hap_pt_share, "Shared EPT tables");
 #undef P
 
-    scan_pci_devices();
+    ret = scan_pci_devices();
+    if ( ret )
+        goto error;
 
     ret = init_vtd_hw();
     if ( ret )