KVM Nested Virtualization: Workings and Usecases
summary
KVM implements x86 nested virtualization by trapping a guest’s VMCS creation, synthesizing a minimal host VMCS (the VMCS02 subset) and running L2 on behalf of L1, with optimizations like nested EPT and shadow VMCS to avoid massive VM exits. Results: a kernel build drops from ~34 to ~10 minutes with nested EPT, CPU‑bound workloads hit ~96–97% of bare‑metal performance. Features include preemption timers, interrupt acknowledgement, nested VPIDs, MSR load/store and ongoing nested VT‑d work. Enable with modprobe kvm_intel nested=1 and expose VMX in QEMU.
AI-written summary · about
chapters (9)
- 0:00Intro
- 0:30INTRODUCTION TO NESTED VIRTUALIZATION
- 2:47STATE OF NESTED VIRTUALIZATION
- 4:19HOW IT WORKS
- 7:12COST OF NESTED VIRTUALIZATION
- 12:56FEATURES TO IMPROVE PERFORMANCE
- 17:54SETTING UP
- 18:59USECASES
- 20:34WAYS TO CONTRIBUTE
related talks
30mNested Virtualization (X86) Part I
30mNested Virtualization (X86) Part II
03h 01mHands-on Introduction to Virtualization
21mEmulating Hyper-V in 2022
32mIntroduce Virtualization and Kernel Infrastructure to Newbies
38mPanel Discussion: KVM-based Virtualization Contributor Q&A
25m"Enlightening" KVM: Hyper-V emulation
23mHyper-V's Virtual Secure Mode in KVM project update
