summaryrefslogtreecommitdiffstats
path: root/kernel/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorJiang, Yunhong <yunhong.jiang@intel.com>2016-07-21 17:36:43 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-07-21 17:36:43 +0000
commit5ac3a5e7a251ed41b93e0616fc789f5521a0fcb6 (patch)
tree7779f4288d0f05079316947a9dec408a789a7a49 /kernel/arch/x86/kvm/vmx.c
parent47cb49e9bd088f1ff1b9ddbc36a1a02dd9f2c8f1 (diff)
parentc81c5f9e9856d3149ec81c099dfddca212a50e54 (diff)
Merge "KVM: VMX: reflect broken preemption timer in vmcs_config"
Diffstat (limited to 'kernel/arch/x86/kvm/vmx.c')
-rw-r--r--kernel/arch/x86/kvm/vmx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/arch/x86/kvm/vmx.c b/kernel/arch/x86/kvm/vmx.c
index 5da019be6..e55417710 100644
--- a/kernel/arch/x86/kvm/vmx.c
+++ b/kernel/arch/x86/kvm/vmx.c
@@ -1101,9 +1101,6 @@ static inline bool cpu_has_broken_vmx_preemption_timer(void)
static inline bool cpu_has_vmx_preemption_timer(void)
{
- if (cpu_has_broken_vmx_preemption_timer())
- return false;
-
return vmcs_config.pin_based_exec_ctrl &
PIN_BASED_VMX_PREEMPTION_TIMER;
}
@@ -3280,6 +3277,9 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf)
&_pin_based_exec_control) < 0)
return -EIO;
+ if (cpu_has_broken_vmx_preemption_timer())
+ _pin_based_exec_control &= ~PIN_BASED_VMX_PREEMPTION_TIMER;
+
if (!(_cpu_based_2nd_exec_control &
SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY) ||
!(_vmexit_control & VM_EXIT_ACK_INTR_ON_EXIT))