From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: [PATCH v2 0/3] KVM: VMX: handle preemption timer value of zero
Date: Thu, 20 Sep 2018 00:50:26 +0200 [thread overview]
Message-ID: <1537397429-38588-1-git-send-email-pbonzini@redhat.com> (raw)
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
next reply other threads:[~2018-09-19 22:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-19 22:50 Paolo Bonzini [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1537397429-38588-1-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.