KVM: LAPIC: Fix lapic timer mode transition
authorWanpeng Li <wanpeng.li@hotmail.com>
Thu, 5 Oct 2017 10:53:51 +0000 (03:53 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 Oct 2017 12:01:50 +0000 (14:01 +0200)
commitc69518c86be5000bf4d8eb0e0d279d40779d2a18
treef2094d7182195ee91aa6c62d135f048a83e58908
parent9cc5fbbb8ca2178d94f2eeeb2ce675293a3f8ae2
KVM: LAPIC: Fix lapic timer mode transition

SDM 10.5.4.1 TSC-Deadline Mode mentioned that "Transitioning between TSC-Deadline
mode and other timer modes also disarms the timer". So the APIC Timer Initial Count
Register for one-shot/periodic mode should be reset. This patch do it.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
[Removed unnecessary definition of APIC_LVT_TIMER_MASK.]
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/lapic.c