diff mbox

[v4,06/14] x86/vtd: refuse to enable IOMMU if the PCI scan fails

Message ID 20161130164950.43543-7-roger.pau@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Roger Pau Monne Nov. 30, 2016, 4:49 p.m. UTC
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>
---
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Kevin Tian <kevin.tian@intel.com>
Cc: Feng Wu <feng.wu@intel.com>
---
Changes since v3:
 - New in this revision.
---
 xen/drivers/passthrough/vtd/iommu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Tian, Kevin Dec. 1, 2016, 12:29 a.m. UTC | #1
> From: Roger Pau Monne [mailto:roger.pau@citrix.com]

> Sent: Thursday, December 01, 2016 12:50 AM

> 

> 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>
diff mbox

Patch

diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index 48f120b..78b5a6a 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -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 )