Skip to content

RFC Add support for nested SVM (kernel)

Alexander Graf kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest9 patches 34 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9Add CPUID feature flag for SVMinclude/asm-x86/cpufeature.h+1 -00 replies
2/9Clean up VINTR settingarch/x86/kvm/svm.c+14 -51 reply
3/9Implement GIF, clgi and stgiarch/x86/kvm/kvm_svm.h arch/x86/kvm/svm.c arch/x86/kvm/svm.h+51 -39 replies
4/9Add helper functions for nested SVMarch/x86/kvm/svm.c+76 -00 replies
5/9Allow setting the SVME bitarch/x86/kvm/svm.c+2 -01 reply
6/9Implement hsavearch/x86/kvm/kvm_svm.h arch/x86/kvm/svm.c+8 -04 replies
7/9Add VMLOAD and VMSAVE handlersarch/x86/kvm/svm.c+67 -24 replies
8/9Add VMRUN handlerarch/x86/kvm/kvm_svm.h arch/x86/kvm/svm.c+196 -22 replies
9/9Add VMEXIT handler and interceptsarch/x86/kvm/svm.c+305 -06 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/9] [RFC] Add support for nested SVM (kernel)

The current generation of virtualization extensions only supports one VM layer. While we can't change that, it is pretty easy to emulate the CPU's behavior and implement the virtualization opcodes ourselves.

This patchset does exactly this for SVM. Using this, a KVM can run within a VM. Since we're emulating the real CPU's behavior, this should also enable other VMMs to run within KVM.
So far I've only tested to run KVM inside the VM though.

This was created with help from Joerg Roedel. I don't really know how put this information in the patchset though. Maybe set him on signed-off-by?

As always, comments and suggestions are highly welcome.

Alexander Graf (9):
Add CPUID feature flag for SVM
Clean up VINTR setting
Implement GIF, clgi and stgi
Add helper functions for nested SVM
Allow setting the SVME bit
Implement hsave
Add VMLOAD and VMSAVE handlers
Add VMRUN handler
Add VMEXIT handler and intercepts

 arch/x86/kvm/kvm_svm.h       |   13 +
 arch/x86/kvm/svm.c           |  716 +++++++++++++++++++++++++++++++++++++++++-
 arch/x86/kvm/svm.h           |    2 +
 include/asm-x86/cpufeature.h |    1 +
 4 files changed, 720 insertions(+), 12 deletions(-)