diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c index 05e740757a..bab7a3d099 100644 --- a/xen/drivers/passthrough/iommu.c +++ b/xen/drivers/passthrough/iommu.c @@ -171,6 +171,9 @@ int iommu_domain_init(struct domain *d, unsigned int opts) struct domain_iommu *hd = dom_iommu(d); int ret = 0; + if ( is_hardware_domain(d) ) + check_hwdom_reqs(d); /* may modify iommu_hwdom_strict */ + if ( !is_iommu_enabled(d) ) return 0; @@ -187,9 +190,6 @@ int iommu_domain_init(struct domain *d, unsigned int opts) if ( ret || is_system_domain(d) ) return ret; - if ( is_hardware_domain(d) ) - check_hwdom_reqs(d); /* may modify iommu_hwdom_strict */ - /* * Use shared page tables for HAP and IOMMU if the global option * is enabled (from which we can infer the h/w is capable) and