From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
To: kvm@vger.kernel.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Maxim Levitsky <mlevitsk@redhat.com>,
Sean Christopherson <seanjc@google.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org,
Emanuele Giuseppe Esposito <eesposit@redhat.com>
Subject: [RFC PATCH 0/2] KVM: nSVM: use vmcb_ctrl_area_cached instead
Date: Fri, 17 Sep 2021 08:49:54 -0400 [thread overview]
Message-ID: <20210917124956.2042052-1-eesposit@redhat.com> (raw)
Similar to what is being done for svm save area in the nested
state (svm->nested.save), svm->nested.ctl contains some fields
that are not used. This introduces the possibility of passing
around uninitialized values, producing unnecessary bugs.
RFC: changing svm->nested.ctl however means that all functions
called with svm->nested.ctl or a normal vmcb control area
struct will need to be modified to handle the new struct.
This is the case of vmcb_is_intercept(), which results in an
additional function definition. And this looks a little bit ugly IMO.
Therefore, the aim of this serie is to gather feedback to see
if there is a better way to change svm->nested.ctl
or if it's even worth doing it.
Based-on: <20210917120329.2013766-1-eesposit@redhat.com>
Suggested-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Emanuele Giuseppe Esposito (2):
nSVM: introduce struct vmcb_ctrl_area_cached
nSVM: use vmcb_ctrl_area_cached instead of vmcb_control_area in
svm_nested_state
arch/x86/kvm/svm/nested.c | 74 +++++++++++++++++++++++++++++----------
arch/x86/kvm/svm/svm.c | 4 +--
arch/x86/kvm/svm/svm.h | 39 ++++++++++++++++++---
3 files changed, 93 insertions(+), 24 deletions(-)
--
2.27.0
next reply other threads:[~2021-09-17 12:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 12:49 Emanuele Giuseppe Esposito [this message]
2021-09-17 12:49 ` [RFC PATCH 1/2] nSVM: introduce struct vmcb_ctrl_area_cached Emanuele Giuseppe Esposito
2021-09-28 16:14 ` Paolo Bonzini
2021-09-17 12:49 ` [RFC PATCH 2/2] nSVM: use vmcb_ctrl_area_cached instead of vmcb_control_area in svm_nested_state Emanuele Giuseppe Esposito
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=20210917124956.2042052-1-eesposit@redhat.com \
--to=eesposit@redhat.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mlevitsk@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@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 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®