KVM: LAPIC: guarantee the timer is in tsc-deadline mode
authorWanpeng Li <wanpeng.li@hotmail.com>
Mon, 24 Oct 2016 10:23:10 +0000 (18:23 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 2 Nov 2016 20:32:17 +0000 (21:32 +0100)
commita10388e11fd09b99ca1bde4b9362502f005fb6d4
treec0fc1c2ce83d5f3984bb05c58e83ca8fe4652106
parent7d7f7da2f1fcd5b63d3b250a9cb4f7618c1f235d
KVM: LAPIC: guarantee the timer is in tsc-deadline mode

Check apic_lvtt_tscdeadline() mode directly instead of apic_lvtt_oneshot()
and apic_lvtt_period() to guarantee the timer is in tsc-deadline mode when
rdmsr MSR_IA32_TSCDEADLINE.

Suggested-by: Radim Krčmář <rkrcmar@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/lapic.c