Skip to content

RFC Nested virtualization for VMX

Qing He xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest17 patches 33 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17vmx: nest: fix CR4.VME in update_guest_crxen/arch/x86/hvm/vmx/vmx.c+2 -12 replies
2/17vmx: nest: rename host_vmcsxen/arch/x86/hvm/vmx/vmcs.c+5 -50 replies
3/17vmx: nest: wrapper for control updatexen/arch/x86/hvm/vmx/intr.c xen/arch/x86/hvm/vmx/vmcs.c xen/arch/x86/hvm/vmx/vmx.c +2 more+52 -343 replies
4/17vmx: nest: domain and vcpu flagsxen/arch/x86/domain.c xen/common/domctl.c xen/include/asm-x86/hvm/domain.h +3 more+17 -16 replies
5/17vmx: nest: nested control structurexen/include/asm-x86/hvm/vmx/nest.h xen/include/asm-x86/hvm/vmx/vmcs.h+49 -00 replies
6/17vmx: nest: virtual vmcs layoutxen/include/asm-x86/hvm/vmx/vvmcs.h+154 -00 replies
7/17vmx: nest: handling VMX instruction exitsxen/arch/x86/hvm/vmx/Makefile xen/arch/x86/hvm/vmx/nest.c xen/arch/x86/hvm/vmx/vmx.c +1 more+549 -72 replies
8/17vmx: nest: L1 <-> L2 context switchxen/arch/x86/hvm/vmx/entry.S xen/arch/x86/hvm/vmx/nest.c xen/arch/x86/hvm/vmx/vmcs.c +3 more+490 -65 replies
9/17vmx: nest: interruptxen/arch/x86/hvm/vmx/intr.c xen/arch/x86/hvm/vmx/nest.c xen/arch/x86/hvm/vmx/vmx.c +1 more+214 -262 replies
10/17vmx: nest: VMExit handler in L2xen/arch/x86/hvm/vmx/nest.c xen/arch/x86/hvm/vmx/vmx.c xen/include/asm-x86/hvm/vmx/nest.h +1 more+192 -05 replies
11/17vmx: nest: L2 tscxen/arch/x86/hvm/vmx/nest.c xen/arch/x86/hvm/vmx/vmx.c xen/include/asm-x86/hvm/vmx/nest.h+37 -02 replies
12/17vmx: nest: CR0.TS and #NMxen/arch/x86/hvm/vmx/nest.c+12 -10 replies
13/17vmx: nest: capability reporting MSRsxen/arch/x86/hvm/vmx/nest.c xen/arch/x86/hvm/vmx/vmx.c xen/include/asm-x86/hvm/vmx/nest.h +2 more+115 -41 reply
14/17vmx: nest: enable virtual VMXxen/arch/x86/hvm/vmx/vmx.c xen/include/asm-x86/hvm/hvm.h+7 -10 replies
15/17vmx: nest: virtual ept for nestedxen/arch/x86/hvm/vmx/Makefile xen/arch/x86/hvm/vmx/nest.c xen/arch/x86/hvm/vmx/vept.c +3 more+734 -73 replies
16/17vmx: nest: hvmtrace for nestedtools/xentrace/formats xen/arch/x86/hvm/vmx/nest.c xen/include/asm-x86/hvm/trace.h +1 more+19 -00 replies
17/17tools: nest: allow enabling nestingtools/examples/xmexample.hvm tools/python/xen/xend/XendConfig.py tools/python/xen/xend/XendDomainInfo.py +2 more+27 -20 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 00/17][RFC] Nested virtualization for VMX

This patch set enables nested virtualization for VMX, That is to allow a VMX guest (L1) to run other VMX guests (L2).

The patch can generally run on different configurations:
- EPT-on-EPT, shadow-on-EPT, shadow-on-shadow
- different 32/64 combination of L1 and L2
- L1/L2 SMP

EPT-on-EPT is however, preferrable due to performance advantage, I've tested the patch on a 64bit NHM L0, against Xen cs. 21190. With EPT-on-EPT and a a kernel build workload, L2 needs around 17% more time to complete.

Known problems:
- L1/L2=64/64, shadow-on-shadow doesn't work as for now
- On 21190, even without nested patchset, Xen as L1 suffers a considerable booting lag, this phenomenon was not observed on my previous base, around cs. 20200
- multiple L2 in one L1 hasn't been tested

The patch list is as below, it contains 3 preparation patches (01 -- 03), 11 generic patches (04 -- 14), 1 to enable EPT-on-EPT (15), and 2 support patches (16, 17).

[PATCH 01/17] vmx: nest: fix CR4.VME in update_guest_cr [PATCH 02/17] vmx: nest: rename host_vmcs [PATCH 03/17] vmx: nest: wrapper for control update [PATCH 04/17] vmx: nest: domain and vcpu flags [PATCH 05/17] vmx: nest: nested control structure [PATCH 06/17] vmx: nest: virtual vmcs layout [PATCH 07/17] vmx: nest: handling VMX instruction exits [PATCH 08/17] vmx: nest: L1 <-> L2 context switch [PATCH 09/17] vmx: nest: interrupt
[PATCH 10/17] vmx: nest: VMExit handler in L2 [PATCH 11/17] vmx: nest: L2 tsc
[PATCH 12/17] vmx: nest: CR0.TS and #NM
[PATCH 13/17] vmx: nest: capability reporting MSRs [PATCH 14/17] vmx: nest: enable virtual VMX [PATCH 15/17] vmx: nest: virtual ept for nested [PATCH 16/17] vmx: nest: hvmtrace for nested [PATCH 17/17] tools: nest: allow enabling nesting

Thanks,
Qing He