static inline bool guest_can_use_l2_superpages(const struct vcpu *v)
{
/*
+ * PV guests use Xen's paging settings. Being 4-level, 2M
+ * superpages are unconditionally supported.
+ *
* The L2 _PAGE_PSE bit must be honoured in HVM guests, whenever
* CR4.PSE is set or the guest is in PAE or long mode.
* It's also used in the dummy PT for vcpus with CR0.PG cleared.
*/
- return (is_pv_vcpu(v)
- ? opt_allow_superpage
- : (GUEST_PAGING_LEVELS != 2
- || !hvm_paging_enabled(v)
- || (v->arch.hvm_vcpu.guest_cr[4] & X86_CR4_PSE)));
+ return (is_pv_vcpu(v) ||
+ GUEST_PAGING_LEVELS != 2 ||
+ !hvm_paging_enabled(v) ||
+ (v->arch.hvm_vcpu.guest_cr[4] & X86_CR4_PSE));
}
static inline bool guest_can_use_l3_superpages(const struct domain *d)