aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index fb0389d3a8d1..01559311df8c 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -39,6 +39,9 @@ module_param(bypass_guest_pf, bool, 0);
39static int enable_vpid = 1; 39static int enable_vpid = 1;
40module_param(enable_vpid, bool, 0); 40module_param(enable_vpid, bool, 0);
41 41
42static int flexpriority_enabled = 1;
43module_param(flexpriority_enabled, bool, 0);
44
42struct vmcs { 45struct vmcs {
43 u32 revision_id; 46 u32 revision_id;
44 u32 abort; 47 u32 abort;
@@ -200,8 +203,9 @@ static inline int cpu_has_secondary_exec_ctrls(void)
200 203
201static inline bool cpu_has_vmx_virtualize_apic_accesses(void) 204static inline bool cpu_has_vmx_virtualize_apic_accesses(void)
202{ 205{
203 return (vmcs_config.cpu_based_2nd_exec_ctrl & 206 return flexpriority_enabled
204 SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES); 207 && (vmcs_config.cpu_based_2nd_exec_ctrl &
208 SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES);
205} 209}
206 210
207static inline int vm_need_virtualize_apic_accesses(struct kvm *kvm) 211static inline int vm_need_virtualize_apic_accesses(struct kvm *kvm)