Skip to content

Nested VMX, v5

Nadav Har'El kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest24 patches 122 repliesIn review

Changes since v4 from the cover letter

* Rebased to the current KVM tree.
* Support for lazy FPU loading.
* Implemented about 90 requests and suggestions made on the mailing list regarding the previous version of this patch set.
* Split the changes into many more, and better documented, patches.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/24Move nested option from svm.c to x86.carch/x86/kvm/svm.c arch/x86/kvm/vmx.c arch/x86/kvm/x86.c +1 more+19 -32 replies
2/24Add VMX and SVM to list of supported cpuid featuresarch/x86/kvm/x86.c+3 -22 replies
3/24Implement VMXON and VMXOFFarch/x86/kvm/vmx.c+102 -25 replies
4/24Allow setting the VMXE bit in CR4arch/x86/kvm/x86.c+1 -12 replies
5/24Introduce vmcs12: a VMCS structure for L1arch/x86/kvm/vmx.c+86 -015 replies
6/24Implement reading and writing of VMX MSRsarch/x86/kvm/vmx.c arch/x86/kvm/x86.c+123 -13 replies
7/24Understanding guest pointers to vmcs12 structuresarch/x86/kvm/vmx.c arch/x86/kvm/x86.c arch/x86/kvm/x86.h+85 -17 replies
8/24Hold a vmcs02 for each vmcs12arch/x86/kvm/vmx.c+95 -03 replies
9/24Implement VMCLEARarch/x86/kvm/vmx.c+43 -114 replies
10/24Implement VMPTRLDarch/x86/kvm/vmx.c+72 -15 replies
11/24Implement VMPTRSTarch/x86/kvm/vmx.c arch/x86/kvm/x86.c arch/x86/kvm/x86.h+33 -23 replies
12/24Add VMCS fields to the vmcs12arch/x86/kvm/vmx.c+295 -02 replies
13/24Implement VMREAD and VMWRITEarch/x86/kvm/vmx.c+221 -27 replies
14/24Prepare vmcs02 from vmcs01 and vmcs12arch/x86/kvm/vmx.c+403 -03 replies
15/24Move register-syncing to a functionarch/x86/kvm/vmx.c+10 -50 replies
16/24Implement VMLAUNCH and VMRESUMEarch/x86/kvm/vmx.c+216 -37 replies
17/24No need for handle_vmx_insn function any morearch/x86/kvm/vmx.c+0 -60 replies
18/24Exiting from L2 to L1arch/x86/kvm/vmx.c+277 -112 replies
19/24Deciding if L0 or L1 should handle an L2 exitarch/x86/kvm/vmx.c+232 -02 replies
20/24Correct handling of interrupt injectionarch/x86/kvm/vmx.c+27 -03 replies
21/24Correct handling of exception injectionarch/x86/kvm/vmx.c+29 -00 replies
22/24Correct handling of idt vectoring infoarch/x86/kvm/vmx.c+33 -09 replies
23/24Handling of CR0.TS and #NM for Lazy FPU loadingarch/x86/kvm/vmx.c+102 -50 replies
24/24Miscellenous small correctionsarch/x86/kvm/vmx.c+1 -10 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/24] Nested VMX, v5

Hi Avi,

This is a followup of our nested VMX patches that Orit Wasserman posted in December. We've addressed most of the comments and concerns that you and others on the mailing list had with the previous patch set. We hope you'll find these patches easier to understand, and suitable for applying to KVM.

The following 24 patches implement nested VMX support. The patches enable a guest to use the VMX APIs in order to run its own nested guests. I.e., it allows running hypervisors (that use VMX) under KVM. We describe the theory behind this work, our implementation, and its performance characteristics, in IBM Research report H-0282, "The Turtles Project: Design and Implementation of Nested Virtualization", available at:

	http://bit.ly/a0o9te

The current patches support running Linux under a nested KVM using shadow page table (with bypass_guest_pf disabled). They support multiple nested hypervisors, which can run multiple guests. Only 64-bit nested hypervisors are supported. SMP is supported. Additional patches for running Windows under nested KVM, and Linux under nested VMware server, and support for nested EPT, are currently running in the lab, and will be sent as follow-on patchsets.

These patches were written by:
Abel Gordon, abelg <at> il.ibm.com
Nadav Har'El, nyh <at> il.ibm.com
Orit Wasserman, oritw <at> il.ibm.com
Ben-Ami Yassor, benami <at> il.ibm.com
Muli Ben-Yehuda, muli <at> il.ibm.com

With contributions by:
Anthony Liguori, aliguori <at> us.ibm.com
Mike Day, mdday <at> us.ibm.com

This work was inspired by the nested SVM support by Alexander Graf and Joerg Roedel.

Changes since v4:
* Rebased to the current KVM tree.
* Support for lazy FPU loading.
* Implemented about 90 requests and suggestions made on the mailing list regarding the previous version of this patch set.
* Split the changes into many more, and better documented, patches.

--
Nadav Har'El
IBM Haifa Research Lab