KVM: LAPIC: Also cancel preemption timer when disarm LAPIC timer
authorWanpeng Li <wanpengli@tencent.com>
Tue, 24 Mar 2020 06:32:10 +0000 (14:32 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 24 Mar 2020 11:25:20 +0000 (07:25 -0400)
commit94be4b85d89520329f766c7d69a4d74bcc87f5b5
treeea070ef51b70d59d3eabc4f4689c8469da2df1ff
parent428b8f1d9f92f838b73997adc10046d3c6e05790
KVM: LAPIC: Also cancel preemption timer when disarm LAPIC timer

The timer is disarmed when switching between TSC deadline and other modes,
we should set everything to disarmed state, however, LAPIC timer can be
emulated by preemption timer, it still works if vmx->hv_deadline_timer is
not -1. This patch also cancels preemption timer when disarm LAPIC timer.

Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Message-Id: <1585031530-19823-1-git-send-email-wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c