Skip to content

RFC KVM: nSVM: use vmcb_ctrl_area_cached instead

Emanuele Giuseppe Esposito kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2nSVM: introduce struct vmcb_ctrl_area_cachedarch/x86/kvm/svm/nested.c arch/x86/kvm/svm/svm.h+63 -01 reply
2/2nSVM: use vmcb_ctrl_area_cached instead of vmcb_control_area in svm_nested_statearch/x86/kvm/svm/nested.c arch/x86/kvm/svm/svm.c arch/x86/kvm/svm/svm.h+30 -240 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/2] KVM: nSVM: use vmcb_ctrl_area_cached instead

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: <[email protected]>

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(-)
Signature · 1 line
2.27.0