Skip to content

KVM: SVM: Add support for VMCB state caching

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 Latest12 patches 6 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/12KVM: SVM: Add clean-bits infrastructure codearch/x86/include/asm/svm.h arch/x86/kvm/svm.c+36 -11 reply
2/12KVM: SVM: Add clean-bit for intercetps, tsc-offset and pause filter countarch/x86/kvm/svm.c+7 -00 replies
3/12KVM: SVM: Add clean-bit for IOPM_BASE and MSRPM_BASEarch/x86/kvm/svm.c+1 -00 replies
4/12KVM: SVM: Add clean-bit for the ASIDarch/x86/kvm/svm.c+3 -00 replies
5/12KVM: SVM: Add clean-bit for interrupt statearch/x86/kvm/svm.c+7 -12 replies
6/12KVM: SVM: Add clean-bit for NPT statearch/x86/kvm/svm.c+3 -00 replies
7/12KVM: SVM: Add clean-bit for control registersarch/x86/kvm/svm.c+7 -00 replies
8/12KVM: SVM: Add clean-bit for DR6 and DR7arch/x86/kvm/svm.c+4 -00 replies
9/12KVM: SVM: Add clean-bit for GDT and IDTarch/x86/kvm/svm.c+3 -00 replies
10/12KVM: SVM: Add clean-bit for Segements and CPLarch/x86/kvm/svm.c+2 -00 replies
11/12KVM: SVM: Add clean-bit for CR2 registerarch/x86/kvm/svm.c+3 -20 replies
12/12KVM: SVM: Add clean-bit for LBR statearch/x86/kvm/svm.c+2 -00 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/12] KVM: SVM: Add support for VMCB state caching

Hi Avi, Hi Marcelo,

here is a patch-set which adds support for VMCB state caching to KVM. This is a new CPU feature where software can mark certain parts of the VMCB as unchanged since the last vmexit and the hardware can then avoid reloading these parts from memory.

The feature is implemented downwards-compatible in hardware, so a 0-bit means the state has changed and needs to be reloaded. This makes it possible to implement the bits without checking for the feature, as done in this patch-set (another reason is that the check is as expensive as clearing the bit). Processors which do not implement VMCB state caching just ignore these bits.

These patches were tested with multiple guests (Windows, Linux, also in parallel) and also with nested-svm.

The patches apply on-top of the intercept mask wrapping patch-set I sent earlier this week. Your feedback is appreciated.

Regards,
Joerg

 arch/x86/include/asm/svm.h |    6 +++-
 arch/x86/kvm/svm.c         |   70 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+), 1 deletions(-)

Joerg Roedel (12):
KVM: SVM: Add clean-bits infrastructure code
KVM: SVM: Add clean-bit for intercetps, tsc-offset and pause filter count
KVM: SVM: Add clean-bit for IOPM_BASE and MSRPM_BASE
KVM: SVM: Add clean-bit for the ASID
KVM: SVM: Add clean-bit for interrupt state
KVM: SVM: Add clean-bit for NPT state
KVM: SVM: Add clean-bit for control registers
KVM: SVM: Add clean-bit for DR6 and DR7
KVM: SVM: Add clean-bit for GDT and IDT
KVM: SVM: Add clean-bit for Segements and CPL
KVM: SVM: Add clean-bit for CR2 register
KVM: SVM: Add clean-bit for LBR state