diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c index 2733b320ec..8b550f909b 100644 --- a/xen/drivers/passthrough/iommu.c +++ b/xen/drivers/passthrough/iommu.c @@ -154,13 +154,13 @@ custom_param("dom0-iommu", parse_dom0_iommu_param); static void __hwdom_init check_hwdom_reqs(struct domain *d) { - if ( iommu_hwdom_none || !paging_mode_translate(d) ) + if ( iommu_hwdom_none || !hap_enabled(d) ) return; - arch_iommu_check_autotranslated_hwdom(d); - iommu_hwdom_passthrough = false; iommu_hwdom_strict = true; + + arch_iommu_check_autotranslated_hwdom(d); } int iommu_domain_init(struct domain *d, unsigned int opts) diff --git a/xen/drivers/passthrough/x86/iommu.c b/xen/drivers/passthrough/x86/iommu.c index 7107b11757..59905629e1 100644 --- a/xen/drivers/passthrough/x86/iommu.c +++ b/xen/drivers/passthrough/x86/iommu.c @@ -85,6 +85,9 @@ void __hwdom_init arch_iommu_check_autotranslated_hwdom(struct domain *d) { if ( !is_iommu_enabled(d) ) panic("Presently, iommu must be enabled for PVH hardware domain\n"); + + if ( !iommu_hwdom_strict ) + panic("PVH hardware domain iommu must be set in 'strict' mode\n"); } int arch_iommu_domain_init(struct domain *d)