@@ -130,13 +130,17 @@ int iommu_domain_init(struct domain *d)
return hd->platform_ops->init(d);
}
-static __init void check_dom0_pvh_reqs(struct domain *d)
+static __init void check_dom0_reqs(struct domain *d)
{
- if ( !iommu_enabled )
+ if ( !paging_mode_translate(d) )
+ return;
+
+ if ( is_pvh_domain(d) && !iommu_enabled )
panic("Presently, iommu must be enabled for pvh dom0\n");
if ( iommu_passthrough )
- panic("For pvh dom0, dom0-passthrough must not be enabled\n");
+ panic("Dom0 uses translate paging mode, dom0-passthrough must not be "
+ "enabled\n");
iommu_dom0_strict = 1;
}
@@ -145,8 +149,7 @@ void __init iommu_dom0_init(struct domain *d)
{
struct hvm_iommu *hd = domain_hvm_iommu(d);
- if ( is_pvh_domain(d) )
- check_dom0_pvh_reqs(d);
+ check_dom0_reqs(d);
if ( !iommu_enabled )
return;