KVM: x86: Clear apic tsc-deadline after deadline
authorNadav Amit <namit@cs.technion.ac.il>
Mon, 18 Aug 2014 19:42:13 +0000 (22:42 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 19 Aug 2014 13:12:29 +0000 (15:12 +0200)
commitfae0ba2157340635fd99912c0c3b7a28c355c588
treeaf039b48e4c60451cb674a6219c44dec87127b3f
parentd7a2a246a1b5a0b0c803e800019600051e1e6f1a
KVM: x86: Clear apic tsc-deadline after deadline

Intel SDM 10.5.4.1 says "When the timer generates an interrupt, it disarms
itself and clears the IA32_TSC_DEADLINE MSR".

This patch clears the MSR upon timer interrupt delivery which delivered on
deadline mode.  Since the MSR may be reconfigured while an interrupt is
pending, causing the new value to be overriden, pending timer interrupts are
checked before setting a new deadline.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c