Skip to content

KVM: SVM: Wrap access to intercept masks into functions

Joerg Roedel kvm lkml 1 version Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 5 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/6KVM: SVM: Add function to recalculate intercept masksarch/x86/kvm/svm.c+26 -170 replies
2/6KVM: SVM: Add manipulation functions for CRx interceptsarch/x86/include/asm/svm.h arch/x86/kvm/svm.c+72 -622 replies
3/6KVM: SVM: Add manipulation functions for DRx interceptsarch/x86/include/asm/svm.h arch/x86/kvm/svm.c+61 -460 replies
4/6KVM: SVM: Add manipulation functions for exception interceptsarch/x86/kvm/svm.c+29 -290 replies
5/6KVM: SVM: Add manipulation functions for misc interceptsarch/x86/kvm/svm.c+51 -330 replies
6/6KVM: SVM: Use get_host_vmcb function in svm_get_msr for TSCarch/x86/kvm/svm.c+2 -70 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/6] KVM: SVM: Wrap access to intercept masks into functions

Hi Avi, Hi Marcelo,

this patchset wraps the access to the intercept vectors in the VMCB into specific functions. There are two reasons for this:

1) In the nested-svm code the effective intercept masks are calculated from the host and the guest intercept masks. Whenever KVM changes the host intercept mask while the VCPU is in guest-mode the effective intercept masks need to be re-calculated. This is nicely wrapped into these functions now and makes the code more robust.

2) These changes make the implementation of the upcoming vmcb-clean-bits feature easier and also more robust (which was the main reason for writing this patchset).

These patches were developed on-top of the patch-set I sent yesterday. I tested these patches with various guests (Windows-64, Linux 32,32e and 64 as well as with nested-svm).

Regards,

Joerg

Summary:

 arch/x86/include/asm/svm.h |   44 +++--
 arch/x86/kvm/svm.c         |  391 ++++++++++++++++++++++++--------------------
 2 files changed, 241 insertions(+), 194 deletions(-)

Joerg Roedel (6):
KVM: SVM: Add function to recalculate intercept masks
KVM: SVM: Add manipulation functions for CRx intercepts
KVM: SVM: Add manipulation functions for DRx intercepts
KVM: SVM: Add manipulation functions for exception intercepts
KVM: SVM: Add manipulation functions for misc intercepts
KVM: SVM: Use get_host_vmcb function in svm_get_msr for TSC