Despite the mid term goal being to do away with the sharing there's no
point in suppressing it in cases where it can be used now.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
}
}
-static int vtd_ept_page_compatible(struct iommu *iommu)
+static int __init vtd_ept_page_compatible(struct iommu *iommu)
{
u64 ept_cap, vtd_cap = iommu->cap;
if ( rdmsr_safe(MSR_IA32_VMX_EPT_VPID_CAP, ept_cap) != 0 )
return 0;
- return ( ept_has_2mb(ept_cap) == cap_sps_2mb(vtd_cap)
- && ept_has_1gb(ept_cap) == cap_sps_1gb(vtd_cap) );
+ return (ept_has_2mb(ept_cap) && opt_hap_2mb) == cap_sps_2mb(vtd_cap) &&
+ (ept_has_1gb(ept_cap) && opt_hap_1gb) == cap_sps_1gb(vtd_cap);
}
/*