unsigned long start_fn, unsigned long nr)
{
/*
- * Note that the !iommu_use_hap_pt() here has three effects:
- * - cover iommu_{,un}map_page() not having an "order" input yet,
+ * Note that the !hap_enabled() here has two effects:
* - exclude shadow mode (which doesn't support large MMIO mappings),
* - exclude PV guests, should execution reach this code for such.
* So be careful when altering this.
*/
- if ( !iommu_use_hap_pt(d) ||
+ if ( !hap_enabled(d) ||
(start_fn & ((1UL << PAGE_ORDER_2M) - 1)) || !(nr >> PAGE_ORDER_2M) )
return PAGE_ORDER_4K;