]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: lapic: Busy wait for timer to expire when using hv_timer
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 16 Apr 2019 20:32:44 +0000 (13:32 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Apr 2019 19:32:15 +0000 (21:32 +0200)
commite35e05f20eec194a817106aa4dcfe8e0b9d45c67
tree8cea01dbd8e86c1451a9d1e73df6de887a7037ab
parenta21be30d7daf9b9c6b214176486edf1cb2508d08
KVM: lapic: Busy wait for timer to expire when using hv_timer

...now that VMX's preemption timer, i.e. the hv_timer, also adjusts its
programmed time based on lapic_timer_advance_ns.  Without the delay, a
guest can see a timer interrupt arrive before the requested time when
KVM is using the hv_timer to emulate the guest's interrupt.

Fixes: 0df4d3c9836dd ("KVM: VMX: Optimize tscdeadline timer latency")
Cc: <stable@vger.kernel.org>
Cc: Wanpeng Li <wanpengli@tencent.com>
Reviewed-by: Liran Alon <liran.alon@oracle.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c