Repository navigation
Repin OpenVMM to microVM v2.2 - #600
Open
Pedro Henrique Penna (ppenna) wants to merge 2 commits into
Open
Pedro Henrique Penna (ppenna) wants to merge 2 commits into
Pedro Henrique Penna (ppenna) wants to merge 2 commits into
Conversation
Pin the openvmm submodule to d0bdbed8f, the head of the new nanvix/openvmm microvm/v2.2 branch. That branch rebases the 320-commit microVM stack of nanvix/openvmm main (5ab8a8462, the previous pin, to which microvm/v2.1 now points) onto microsoft/openvmm main at 790132851. It drops eight commits that upstream already contains or supersedes and folds the adaptations to upstream API changes into the commits that needed them. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The behavioral hypervisor rebase needs human review and completed KVM, MSHV, and WHP runtime and benchmark validation.
No open issues 🎉
What changed in this PR
Promotes NVX’s OpenVMM dependency to microVM v2.2, incorporating an upstream rebase and compatibility adaptations.
Changes:
- Updates only the
openvmmgitlink from5ab8a8462tod0bdbed8f. - Introduces behavioral changes affecting time control, interrupts, networking, and device configuration.
| File | Description |
|---|
Review effort: Balanced
microsoft/openvmm#4578, which the microVM v2.2 pin brings in, adds nested VMM tests whose names contain "openvmm", so the KVM and MSHV filters select them. Nine run an aarch64 L1 host that needs an aarch64-unknown-linux-musl test archive, which the Linux runners cannot build, so flowey fails while it defines the pipeline. The remaining one needs nested virtualization. Every nested test name contains its L1 host's test function, vm_host or a variant, and no other test name does. Exclude those names on both Linux backends. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| # A nested test runs inside an L1 VM host whose test function, vm_host or a | ||
| # variant, appears in its name. The Linux runners support neither nested | ||
| # virtualization nor the aarch64-unknown-linux-musl archive of aarch64 hosts. | ||
| OPENVMM_NESTED_TEST_EXCLUSION = " & !test(vm_host)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Repin OpenVMM to microVM v2.2
This PR pins the
openvmmsubmodule tod0bdbed8f6e3b86271277dc22658109e2e633b2d, the head of the new nanvix/openvmmmicrovm/v2.2branch. A second commit stops the Linux VMM-test runs from selecting the nested tests that the new pin brings in (see CI).5ab8a8462, nanvix/openvmmmain.microvm/v2.1was fast-forwarded from2130f24b5to this commit (12 commits), so it now records the complete v2.1 line.d0bdbed8f, which is5ab8a8462's 320-commit microVM stack rebased onto microsoft/openvmmmainat790132851(75 upstream commits after v2.1's basee1cdbd916). The branch has 312 linear commits, and every one carries a good signature.microvm/v2.2was pushed directly, and nanvix/openvmmupstream/mainwas not changed.3c0bbc15e5320329da654617e15d93795d914346, two commits ondeve67a06f40.Equivalence
git range-diff e1cdbd916..5ab8a8462 790132851..d0bdbed8freports 262 unchanged commits, 50 changed commits, and 8 dropped commits. No commit was added or reordered. Of the changed commits, 23 differ only in context lines. The tree differs from the previous pin by the upstream changes and the resolutions and adaptations below, so this is a behavioral promotion, not a tree-identical one.Dropped commits:
virt_mshv: describe SNP guest workarounds without ACI-specific names(virt_mshv: describe SNP guest workarounds generically openvmm#4580),virtio: make interrupt tests wait for queue completion(virtio: make interrupt tests wait for queue completion openvmm#4592),fuse: rate-limit guest-triggerable diagnostics(fuse: rate-limit guest-triggerable diagnostics openvmm#4581),virtio_console: rate-limit worker errors(virtio_console: rate-limit worker errors openvmm#4614), andopenvmm_entry: accept delay:<ms>:<disk> disk wrappers(openvmm_entry: acceptdelay:<ms>:<disk>disk wrappers openvmm#4610).nextest: scope a longer budget to the exhaustive ring-buffer loom test(nextest: raise the loom test budget and apply it to the agent profile openvmm#4584) andpal: create files and directories with explicit security descriptors(pal: create files and directories with explicit security descriptors openvmm#4599). Keeping them would have left shadowed nextest overrides and a second copy of the two pal functions. Snapshot staging now calls upstream'screate_file_with_securityandcreate_directory_with_security, whose bodies are byte-identical to the fork's.kvm: preserve pending external interrupts across VP-state capture. kvm: preserve PIC interrupts across VP state save and restore openvmm#4522 fixes the same lost-ExtINT-on-capture bug by injecting PIC interrupts through theKVM_SET_VCPU_EVENTSslot, and it rejects the user-mode vector tracking that this commit added. No later commit used the removed API.Resolved conflicts:
finalize_memory, fallible state-unit start, snapshot module, MSHV time ABI field, and LAPIC re-assert keep their behavior around the new calls. MSHV no longer thaws time inrun_vp.cpu_contract,fingerprint, and time ABI code sit beside upstream'sextintmodule,run_vpkeeps upstream's interrupt-window bookkeeping before the time ABI sync, and both error variants are kept.net_tapLSO checksums (net_tap, gdma: fix checksums on LSO frames openvmm#3812): the fork moved and later rewrote the transmit path, so upstream's IPv6 UDP-segmentation length fixup andfixup_gso_pseudo_headercall were ported intotx.rs, ahead of the egress-policy check.--machine microvmis checked before the newIgvmClimatch, and the controller takesigvm_pathfromIgvmCli.firmware.with_nested_virtand its nested-virt save/restore TODO beside the fork's port-based virtio-net save/restore predicate.Cargo.lockdependency lists, and module lists were merged.ci: restrict privileged, self-hosted, and publishing jobs to microsoft/openvmm: upstream's vmm-perf job now targets ARM Windows too ([VMMPerf] Add support for ARM Windows openvmm#4568), and the pipelines were regenerated withcargo xflowey regen.Adaptations, each folded into the commit that introduced the affected code so that intermediate commits build:
MshvPartitionInner::freeze_timeandthaw_timethat the fork's TSC synchronization and time ABI code call. They are restored, and upstream's infalliblePartitionTimeControlimplementation delegates to them with the same panic messages.virtandvirt_kvmdepend oncpu_profile, which bringsserde_jsonand itsPartialEq<Value>implementations for integers into the dependency graph. Upstream comparisons of the formx == y.into()inopenhcl_tdispand the new KVM ExtINT tests became ambiguous, so their conversions are explicit.ConsommeHandle(openhcl: support explicit VMBus offer ordering for MANA VFs openvmm#4507), petri's QEMU builder (petri: nested test support openvmm#4578, which now asserts the standard machine profile), the partition-unit tests (virt: control partition time at VM lifecycle boundaries openvmm#4524: fallible start, VP capacity,omit_saved_tsc), the IGVM CLI tests (openvmm_entry: require igvm personality, add openhcl personality openvmm#4551: defaultMicrovmRestore), andDiskCli.serialand a virtio-blk test helper (virtio_blk: Make device serial configurable openvmm#4511).[dev-dependencies]tables (serial_socket,vmm_core); each is merged in the commit that produced it.Wire compatibility
Every
vmservice.protofield that the previous pin defines keeps its number, and no message reuses a tag. Upstream addsSerialBackend.file,VirtioBlk.serial,VirtioVsock.guest_cid, andSnpIsolationConfig, and it reshapesIsolationConfigfrom an enum to a oneof. NVX does not useIsolationConfig.Validation
Bare metal
At this head, three bare-metal hosts with Intel Xeon Silver 4114 (Skylake-SP) CPUs ran CI's test steps from isolated checkouts: Linux/KVM (Ubuntu, kernel 7.0), Linux/MSHV (Azure Linux 3.0, kernel 6.6), and Windows Server 2025/WHP. The microVM steps were generated from
run-nvx-microvm-tests.ymlwith CI's shells and inputs. Each host also ran the debug-kernel restore scenarios, which CI runs for MSHV and WHP only on pushes todev. The guest images are CI's exact-headguest-artifactsandguest-debug-kernel. The MSHV and WHP hosts built OpenVMM from the pin. The KVM host's microVM tests used CI's exact-pinopenvmm-linux-gnubuild, whose SHA-256 matches its provenance, and itstest-openvmmcompiled from source.doctorH1 to H4: CPU profileintel.skylake-sp.v1and time ABI preflighttest-microvm, every scenariotest-microvm --debug-kernelaci_edge_sandboxeslifecycletest-openvmmtest-openvmm-unitvalidate-nvxsteps pass on the KVM host: 1181 tests.smp,smp-snapshot, andrestore-processorsgave maximum backward steps of 17, 17, and 21 ns at the previous pin and 21, 23, and 10 ns at this pin, with maximum offsets of 66 to 68 ns for both.Build and unit checks
These checks ran on a Windows x86-64 workstation and in WSL2 Ubuntu with Rust 1.95.0.
cargo check --workspace --all-targets --locked, every commitcargo clippy --workspace --all-targets --locked -- -D warnings, headtest-openvmm-unitsuite, headvirt: build the time ABI effective CPUID in one placetovirt_mshv, virt_whp: name test host fixtures by CPU, don't build thevirt_support_x86emutests on either platform. Their v2.1 counterparts have the same gap:virtstarts depending onserde_jsonthere, and the stack's ownvirt_support_x86emu: make the tests' vector and VTL comparisons explicitfixes it right after them. Those test lines are unchanged sincee1cdbd916.virt_whp: use the shared Hyper-V feature tablewarn about unused constants invirt_whp/src/profile_features.rs. That file and its users match v2.1 at those commits. No other commit warns on either platform.cargo metadata --lockedpasses at every commit, andcargo xtask fmtpasses at the head.openvmm_helperssnapshot-publishing test. In each of two full runs under heavy load, one such test, a different one each time, failed because renaming a freshly written staging directory in%TEMP%returnedERROR_ACCESS_DENIED.openvmm_helperspassed 10 of 10 runs alone, both at this pin and at the previous pin, and its code differs from the previous pin only by calling upstream's byte-identical pal functions. Onenet_consommeloopback test failed once withWSAEACCESunder the same load and passes alone. On the bare-metal WHP host, all 4933 tests pass.verifyand the Windowsvalidate-nvxsteps pass at the pin commit. One host-loopback script test exceeded its 10-second budget while the per-commit builds ran, and it passes alone.CI
On the pin commit alone, run 39103565708 passed every job except the KVM and MSHV
OpenVMM vmm-testsjobs, with the WHP VMM and microVM jobs still running when the fix was pushed. microsoft/openvmm#4578 adds nested VMM tests whose names containopenvmm, which the Linux filter selects. Nine of them need anaarch64-unknown-linux-musltest archive, which the runners can't build, so flowey failed while it defined the pipeline. The tenth needs nested virtualization.Exclude OpenVMM's nested VMM tests from the Linux runsadds!test(vm_host)to both Linux filters, because every nested test name contains its L1 host'svm_host*test function. Listing the vmm_tests binary at the pin on Linux shows the fix removes exactly those 10 tests and nothing else (KVM: 68 to 58, MSHV: 67 to 57). ruff, pyright for both platforms, andtest_nvx_toolspass.At this head, run 39130146896 passed every job: the OpenVMM builds, unit tests, and VMM tests on all three backends, the NVX microVM tests (including the KVM debug kernel), the KVM, MSHV, and WHP platform benchmarks, and the performance regression gate.