KVM: VMX: modify preemption timer bit only when arming timer
commitf459a707ed313f110e4939d634317edcf9e96774
authorSean Christopherson <sean.j.christopherson@intel.com>
Mon, 27 Aug 2018 22:21:11 +0000 (27 15:21 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 19 Sep 2018 22:51:41 +0000 (20 00:51 +0200)
treed2be01b3023b1c4e9738ba540b822837ed080a27
parent4c008127e4716d246b44b403f8a65ae9744d32c4
KVM: VMX: modify preemption timer bit only when arming timer

Provide a singular location where the VMX preemption timer bit is
set/cleared so that future usages of the preemption timer can ensure
the VMCS bit is up-to-date without having to modify unrelated code
paths.  For example, the preemption timer can be used to force an
immediate VMExit.  Cache the status of the timer to avoid redundant
VMREAD and VMWRITE, e.g. if the timer stays armed across multiple
VMEnters/VMExits.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c