From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Liran Alon" <liran.alon@oracle.com>
Subject: [PATCH v2 0/2] x86/kvm/nVMX: fix Enlightened VMCLEAR
Date: Fri, 28 Jun 2019 13:23:31 +0200 [thread overview]
Message-ID: <20190628112333.31165-1-vkuznets@redhat.com> (raw)
VMCLEAR implementation for Enlightened VMCS is not entirely correct
when something else than the currently active eVMCS on the calling vCPU
is targeted. In case there's no currently active eVMCS on the calling vCPU
we are corrupting the targeted area by writing to the non-existent
launch_state field.
Fix the logic by always treating the targeted area as 'enlightened' in case
Enlightened VMEntry is enabled on the calling vCPU.
Changes since v1:
- 'evmcs_vmptr' -> 'evmcs_gpa' [Paolo Bonzini]
- avoid nested_release_evmcs() in handle_vmclear even for the currently
active eVMCS on the calling vCPU [Liran Alon], PATCH1 added to support
the change.
Vitaly Kuznetsov (2):
x86/KVM/nVMX: don't use clean fields data on enlightened VMLAUNCH
x86/kvm/nVMX: fix VMCLEAR when Enlightened VMCS is in use
arch/x86/kvm/vmx/evmcs.c | 18 ++++++++++++++
arch/x86/kvm/vmx/evmcs.h | 1 +
arch/x86/kvm/vmx/nested.c | 52 ++++++++++++++++++++++-----------------
3 files changed, 49 insertions(+), 22 deletions(-)
--
2.20.1
next reply other threads:[~2019-06-28 11:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 11:23 Vitaly Kuznetsov [this message]
2019-06-28 11:23 ` [PATCH v2 1/2] x86/KVM/nVMX: don't use clean fields data on enlightened VMLAUNCH Vitaly Kuznetsov
2019-06-28 11:23 ` [PATCH v2 2/2] x86/kvm/nVMX: fix VMCLEAR when Enlightened VMCS is in use Vitaly Kuznetsov
2019-07-02 16:30 ` [PATCH v2 0/2] x86/kvm/nVMX: fix Enlightened VMCLEAR 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=20190628112333.31165-1-vkuznets@redhat.com \
--to=vkuznets@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liran.alon@oracle.com \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
/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 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®