mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] KVM: VMX: handle preemption timer value of zero
@ 2018-09-19 22:50 Paolo Bonzini
  2018-09-19 22:50 ` [PATCH 1/3] KVM: VMX: immediately mark preemption timer expired only for zero value Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paolo Bonzini @ 2018-09-19 22:50 UTC (permalink / raw)
  To: linux-kernel, kvm



A VMX preemption timer value of '0' at the time of VMEnter is
architecturally guaranteed to cause a VMExit prior to the CPU
executing any instructions in the guest.  KVM serendipitously
emulates this behavior when running as L0, but doesn't ensure
correct emulation when running at L1 or higher.  Explicitly
emulate the architectural behavior of a timer value of '0'.

v1->v2:
- move flag to vmx->loaded_vmcs
- extract arming the timer to a separate function instead of using a boolean
- clean up SVM

Sean Christopherson (3):
  KVM: VMX: immediately mark preemption timer expired only for zero
    value
  KVM: VMX: modify preemption timer bit only when arming timer
  KVM: VMX: use preemption timer to force immediate VMExit

 arch/x86/include/asm/kvm_host.h |  2 +
 arch/x86/kvm/svm.c              |  2 +
 arch/x86/kvm/vmx.c              | 94 ++++++++++++++++++++++++++---------------
 arch/x86/kvm/x86.c              |  8 +++-
 4 files changed, 70 insertions(+), 36 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-19 22:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-19 22:50 [PATCH v2 0/3] KVM: VMX: handle preemption timer value of zero Paolo Bonzini
2018-09-19 22:50 ` [PATCH 1/3] KVM: VMX: immediately mark preemption timer expired only for zero value Paolo Bonzini
2018-09-19 22:50 ` [PATCH 2/3] KVM: VMX: modify preemption timer bit only when arming timer Paolo Bonzini
2018-09-19 22:50 ` [PATCH 3/3] KVM: VMX: use preemption timer to force immediate VMExit Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®