Commit Message

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>
---
arch/x86/kvm/vmx.c | 45 ++++++++++++++++++++++-----------------------
1 file changed, 22 insertions(+), 23 deletions(-)

On 20/09/2018 00:13, Sean Christopherson wrote:
> Works for me, I all but literally flipped a coin when choosing between> the two approaches. Do you want me to send a v2 with this change and> hv_timer_armed moved to loaded_vmcs?
No, I'm sending it now (the above doesn't actually compile, it was just
a sketch).
Paolo