]> xenbits.xensource.com Git - people/larsk/xen.git/commitdiff
x86/iommu: fix hwdom iommu requirements check
authorRoger Pau Monné <roger.pau@citrix.com>
Mon, 30 Sep 2019 13:46:57 +0000 (15:46 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 30 Sep 2019 13:46:57 +0000 (15:46 +0200)
Both a shadow and a HAP hwdom require an iommu and must be run in
strict mode. Change the HAP check into a hvm domain check.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/drivers/passthrough/iommu.c

index 8b550f909ba182e9cc0723ac193d49483493b629..9ef5f376c5b4d796a8a1e69cc120f4cca95fc0a9 100644 (file)
@@ -154,7 +154,7 @@ custom_param("dom0-iommu", parse_dom0_iommu_param);
 
 static void __hwdom_init check_hwdom_reqs(struct domain *d)
 {
-    if ( iommu_hwdom_none || !hap_enabled(d) )
+    if ( iommu_hwdom_none || !is_hvm_domain(d) )
         return;
 
     iommu_hwdom_passthrough = false;