All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] KVM: nSVM: use vmcb_ctrl_area_cached instead
@ 2021-09-17 12:49 Emanuele Giuseppe Esposito
  2021-09-17 12:49 ` [RFC PATCH 1/2] nSVM: introduce struct vmcb_ctrl_area_cached Emanuele Giuseppe Esposito
  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
  0 siblings, 2 replies; 4+ messages in thread
From: Emanuele Giuseppe Esposito @ 2021-09-17 12:49 UTC (permalink / raw)
  To: kvm
  Cc: Paolo Bonzini, Maxim Levitsky, Sean Christopherson,
	Vitaly Kuznetsov, Wanpeng Li, Jim Mattson, Joerg Roedel,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	H. Peter Anvin, linux-kernel, Emanuele Giuseppe Esposito

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


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

end of thread, other threads:[~2021-09-28 16:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17 12:49 [RFC PATCH 0/2] KVM: nSVM: use vmcb_ctrl_area_cached instead Emanuele Giuseppe Esposito
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

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.