Repository navigation
nvx: prototype nested KVM guests - #121
Pedro Henrique Penna (ppenna) wants to merge 1 commit into
Conversation
Build Intel and AMD KVM host support into the NVX guest kernel and validate that generated artifacts retain the required options. Add an opt-in --nested-virt switch to nvx run so OpenVMM exposes VMX/SVM to supported guests. Extend Windows/WHP benchmarks with an explicit nested-virtualization control, thread it through cold boot, capture, and restore commands, and record the mode in lifecycle and workload metadata. Add focused CLI, command-construction, metadata, and kernel-configuration coverage together with user and design documentation. Pin OpenVMM to c345138ddedeb9b2c4b153d6eec5055ad8375969 from nanvix/openvmm#82. This remains a draft experiment: the guest-visible CPU contract is still labeled ABI v2, KVM nested processor state is not snapshot-capable, and MSHV remains unsupported. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Nested results can currently be mixed with and persisted into ordinary ABI-v2 history, while Linux/KVM runtime coverage remains pending.
Review effort: Balanced
Findings: 1
What changed in this PR
Prototypes nested KVM guests by enabling guest KVM support and forwarding nested virtualization through NVX and WHP benchmarks.
Changes:
- Enable Intel and AMD KVM guest-host support.
- Add nested virtualization CLI forwarding, benchmark metadata, and tests.
- Update documentation and pin the supporting OpenVMM revision.
| File | Description |
|---|---|
doc/design/configuration-boundary.md |
Documents nested virtualization boundaries. |
doc/design/current-limits.md |
Records ABI, snapshot, and persistence limitations. |
doc/usage.md |
Documents new CLI options. |
kernel/config-microvm |
Enables KVM host drivers. |
openvmm |
Pins the supporting OpenVMM revision. |
scripts/nvx.py |
Forwards nested virtualization for runs. |
scripts/nvx_tools/benchmark.py |
Adds benchmark forwarding and metadata. |
scripts/nvx_tools/build.py |
Validates required KVM configuration. |
scripts/nvx_tools/release.py |
Verifies release kernel configuration. |
scripts/test_nvx_tools.py |
Adds nested virtualization tests. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "suite": args.suite, | ||
| "platform": platform, | ||
| "backend": backend, | ||
| "nested_virtualization": nested_virt_requested(args), |
|
Closing as not planned. This draft established useful feasibility evidence, but it leaves the machine ABI, nested snapshot state, sandbox /dev/kvm policy, performance-result identity, and platform coverage unresolved. Follow-up is tracked in #256, which preserves the prototype revisions, known gaps, proposed work, and acceptance criteria. |

Summary
--nested-virtforwarding tonvx runOpenVMM dependency
c345138ddedeb9b2c4b153d6eec5055ad8375969or patch-equivalence claim is needed
git verify-commitLocal validation
python scripts\nvx.py verifyThe earlier feasibility probe exposed VMX, created
/dev/kvm, reported KVM APIversion 12, created an L2 VM and vCPU, and completed
KVM_RUNwithKVM_EXIT_HLT.CI-equivalent nested benchmarks on this host collected 36 one-vCPU metrics and
2/4/8-vCPU restore results. Representative p50 values:
Scope and exclusions
This is intentionally a draft proof of concept. It does not:
/dev/kvminside the private sandbox workload/devLinux/KVM runtime coverage is pending a nested-capable Linux host or CI.
Submitted head
725f49852b00123a6a291e93104eac2a297ee966