]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commitee66e453db13d4837a0dcf9d43efa7a88603161b
tree8cea01dbd8e86c1451a9d1e73df6de887a7037ab
parent6c6a2ab962af8f197984c45d585814f9839e86d5
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: c5ce8235cffa0 ("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