Repository navigation
openvmm: pin microVM v6.1, rebased onto upstream main - #1567
Conversation
This pull request changes existing testsIt modifies or removes 5 existing test asset(s), listed below. Review each with care: a change to a test can hide a regression that the test caught. See doc/contribute.md#changes-to-existing-tests. Test code
Relocated unchanged: 0; added: 1. Compared the merge base |
There was a problem hiding this comment.
🔵 Needs a closer look
The 268-commit OpenVMM rebase requires maintainer-led backend validation because the PR reports an unresolved MSHV RestoreVM failure, exact-pin CI remains in progress, and supplied diffs omit the rebased source.
No open issues 🎉
What changed in this PR
This PR rebases NVX’s OpenVMM pin onto microVM v6.1. The reviewed changes adapt NVX’s manifest reader to upstream’s new snapshot ID field while preserving compatibility with older manifests.
Changes:
- Accept manifest field 18 when it contains a 16-byte snapshot ID, without using its value.
- Update fixtures and tests to cover absent, nonzero, and malformed IDs, plus truncation handling.
- Document snapshot ID validation for template and restore manifests.
| File | Description |
|---|---|
nvx-rs/src/host/template/tests.rs |
Adds optional snapshot IDs to shared manifest fixtures and encoding. |
nvx-rs/src/host/template/manifest/tests.rs |
Tests snapshot ID compatibility and length validation; adjusts unknown-field and truncation checks. |
nvx-rs/src/host/template/manifest.rs |
Accepts field 18 and validates its 16-byte length. |
nvx-rs/README.md |
Documents length-only snapshot ID validation. |
Review effort: Balanced
Pin the openvmm submodule to 73cf40357, the head of the new feature/microvm/release/v6.1 branch of microsoft/openvmm. That branch rebases the 268-commit microVM chain of feature/microvm/dev, through the previous pin, 5ca20ee08, from ba105dd7f onto microsoft/openvmm main at 7d90c4104, 44 upstream commits later. Upstream landed seven of the chain's commits, so the rebase drops v6.0 positions 002, 008, 009, and 014, which microsoft/openvmm#4595, microsoft/openvmm#4591, microsoft/openvmm#4604, and microsoft/openvmm#4609 merged, and 051-053, whose MP table builder and firmware-less Linux direct boot microsoft/openvmm#4554 merged in a revised form. Replaying the other 261 conflicts at 16 positions, 11 of them with microsoft/openvmm#4553, upstream's SaveVM and RestoreVM for the management RPC, which records a snapshot ID in the manifest's field 18 and changes the snapshot publication that the chain replaces. The rebase publishes upstream's snapshots through the chain's staged publication, gives a microVM capture the zero snapshot ID, and has RestoreVM refuse a microVM, which restores from its authoritative manifest through CreateVM instead. Eight fixups at its tip adapt the chain to upstream changes that no conflict exposed: the user SID queries at upstream's path, upstream's MP-table boot module, and six for microsoft/openvmm#4553. The last two save the VM of upstream's ttrpc interface test with a VMBus NIC, since the chain's virtio-net saves only a NIC with a static identity and feature contract, and drop the page cache of each independent copy that the chain's snapshot publication makes: on MSHV, with the snapshot on ext4, the VM that the test restores in place from such a copy of its memory stopped as soon as it resumed while the copy's pages were still cached. OpenVMM's snapshot manifests therefore carry field 18, which mesh writes even when the ID is zero, and nvx-rs's reader of a template's manifest refuses fields that it does not know. Accept field 18 and check only that it holds 16 bytes, since a microVM capture leaves it zero and a template depends on nothing in it, and test that a manifest without it, one of an earlier OpenVMM, still reads, as does one with an ID that is not zero. The other vectors, excerpts, contract versions, and CPU profiles that nvx-rs copies from OpenVMM match the pin. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The feature/microvm/release/v6.1 rebase, which the previous commit pins, moved the microVM chain from ba105dd7f onto upstream main at 7d90c4104 and dropped the seven commits that upstream landed, so positions from 003 on are lower than in v6.0: by one through v6.0 position 007, by three through 013, by four through 050, and by seven from 054 on. Remap the scope, upstream status, graph, branch DAG, the commits after the mapped tip, PR summary, and commit mapping onto the rebased commits, and name each commit's v6.0 position in the table of commits after the mapped tip and in the mapping. Record the dropped commits and the forms in which upstream landed them, which leave nothing of PR04, the 16 conflicts that the rebase resolved and the workflows that it regenerated at position 121, and the eight fixups at positions 262-269, each with the commits that it folds into. As of 2026-11-13, microsoft/openvmm#4611 and microsoft/openvmm#4615 are closed, and seven of the ten open upstream pull requests are drafts. The remarks on whether commits apply to upstream main record what was found on ba105dd7f and earlier bases; the rebase did not check them again. The pin, 73cf40357, is position 269, 145 commits past the mapped tip. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
253502c to
79e9356
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The 268-commit OpenVMM rebase has an unresolved MSHV RestoreVM regression and failed exact-pin CI, requiring maintainer assessment and passing required runtime validation before promotion.
No open issues 🎉
Review effort: Balanced
What and why
Status: The release has landed in OpenVMM:
feature/microvm/devis now the pin,73cf40357, andfeature/microvm/release/v6.0holds the previous line at5ca20ee08. OpenVMM CI passes the six jobs that NVX requires on the pin (run 43410228612), and NVX CI of this head passes (run 43413731642). This PR merges through the merge queue once a maintainer approves it; see Landing order.Pins
openvmmto microVM v6.1: the microVM chain offeature/microvm/devrebased onto the latest upstream OpenVMMmainas a minor release. Upstream merged seven of the chain's commits, so the rebase drops them; 16 commits conflicted with upstream and were resolved in place, and eight fixups at the tip adapt the chain to upstream changes that no conflict exposed, two of them to failures of upstream's ttrpc interface test that OpenVMM CI found. Most of the work comes from microsoft/openvmm#4553, upstream's SaveVM and RestoreVM for the management RPC, which records a snapshot ID in the snapshot manifest's field 18, so the gitlink commit also hasnvx-rs's reader of a template's manifest accept that field. The second commit maps the rebased chain in the OpenVMM upstream roadmap.OpenVMM source
73cf403574a8907ee94dab0ab9d648152b832b05, position 269, the head offeature/microvm/release/v6.1(new).5ca20ee08, the head offeature/microvm/dev, which openvmm: skip a periodic timer's missed periods at once #1565 pinned: the 220 commits offeature/microvm/release/v6.0(cf6c03977) and the 48 that OpenVMM pull requests merged after it, through [DO NOT REVIEW] vmcore: skip a periodic timer's missed periods at once openvmm#5073.mainat7d90c4104(2026-11-13), 44 commits past the v6.0 baseba105dd7f.mainsince: none;7d90c4104is still its head.feature/microvm/dev: [DO NOT REVIEW] microvm: enable governed ARM64 cold boot on WHP openvmm#5045 ([DO NOT REVIEW], three commits on5d656d854, v6.0 position 263) is not part of this release, and now thatfeature/microvm/devis the pin, it needs a rebase onto it. NVX's only other open pull request that moves the gitlink, the draft [Draft] arm64: extend shared cold-runtime validation #1516, which is stacked on another feature branch, pins that pull request's head,6036d7ee6, which was never onfeature/microvm/dev, so it needs a new pin after that rebase.What changed in OpenVMM
Seven drops. Upstream merged these, all but the first after review changes, so the rebase takes upstream's versions and adapts the later commits to them:
707747c16flowey: distinguish native Windows and WSL nextest paths5d3ab02f0, an identical patch299a04d4fpal: query Unix socket peer credentials42d4fe619, with testsa0e70d99epal: resolve the process token user SID6937acefb, inpal::windows::securityitself rather than auser_sidmodule5ed5f7a22serial_socket: keep Windows named-pipe listeners reconnectablef5ef11b8a, which keeps the write handling that aRetainconsole on a named pipe needs6cea1ae18,4ccef3c27,b585c7300loader: buffer reuse, MP 1.4 table builder, firmware-less Linux direct boote4728b7f4, asloader::linux::mptable_bootwith azerocopytable builder and an I/O APIC numbered after the processors, loading throughload_kernel_and_initrd_x64, which needs no buffer reuseWith them, PR04 has landed whole, and PR03, PR06, and PR14 keep one commit each.
16 conflicts, resolved in place. Eleven are with microsoft/openvmm#4553, which adds SaveVM and RestoreVM, records a snapshot ID in the manifest's field 18, and changes the snapshot publication that PR11 replaces:
snapshot_idafter the chain's fields; a microVM capture leaves it zero, the manifest's "no ID".check_snapshot_destinationstays, before SaveVM pauses the VM.memory.bin, as upstream's does, and refuses a microVM, which restores from its authoritative manifest through CreateVM; the command line keeps its private copy-on-write restore.MemoryConfig.backing_file_path(field 10) is now upstream'soptionalfield, which a standard VM gives SaveVM and a microVM its RAM file.The other five: microsoft/openvmm#4591 (the
credentialsmodule beside the chain'sfd_table), microsoft/openvmm#5018, microsoft/openvmm#4147, and microsoft/openvmm#4554 (supports_acpi_power_buttonfrom the load mode, the microVM's load mode before IGVM, the direct-boot guide), microsoft/openvmm#4609 (its named-pipe tests replace the dropped commit's), microsoft/openvmm#5057 (the fork's CI gates take the runner of upstream's new pool tuples;cargo xflowey regenreproduces the merge), and microsoft/openvmm#4554 again, at position 183, whose routing of every IOAPIC input moves onto upstream'szerocopybuilder. Position 121's generated workflows replayed without a conflict but displaced the SIVM IGVM steps of microsoft/openvmm#4940, so the rebase regenerated them withcargo xflowey regen. The roadmap's Conflicts of the v6.1 rebase lists each resolution.Eight fixups at the tip, each to fold into the commits that it names at the next reorganization:
55adb5c93serial_socket, openvmm_entry: resolve user SIDs at upstream's pathb9a8f7f6eopenvmm_core: load microVMs through upstream's MP-table boot module7b98adc6dopenvmm_entry, openvmm_helpers: read upstream's snapshots through OpenedSnapshot5460c8e05openvmm_entry, openvmm_helpers: record no snapshot ID in microVM captures649aeacf0ttrpc: give the guest exit test's service upstream's SaveVM state4a1d9b07aGuide, openvmm_entry: describe upstream's snapshots with the chain's publication63688dd58vmm_tests: save the ttrpc interface test's VM with a VMBus NIC73cf40357openvmm_helpers: drop an independent snapshot copy's page cachePosition 268 answers the first OpenVMM CI run of the release, run 43393543822 on
4a1d9b07a, whose four required VMM test jobs failed onlyttrpc::test_ttrpc_interface: upstream's #4553 version of that test saves and restores the VM of its iteration 1, which has the test's only virtio-frontend NIC, and the chain's virtio-net (position 044, PR13) saves only a NIC bound to a static identity and feature contract, which the management RPC does not configure, so SaveVM answeredsave state not supported. Upstream's test already leaves the virtio consoles, which cannot be saved, out of that iteration; position 268 gives it the VMBus NIC of the other iterations and moves the virtio-frontend NIC to iteration 2, which does not save.Position 269 answers the second, run 43398301692 on
63688dd58, whose MSHV VMM test job failed the same test after SaveVM succeeded: within a millisecond of the VM that RestoreVM restored in place frommemory.binstarting, VP 1 took a memory access exit while an interrupt was being delivered, on guest RAM at0x2644fe0, which OpenVMM's emulator refuses (an interrupt caused the memory access exit), and the guest stopped. Its other VMM test jobs passed the test, and upstreammainpasses it on MSHV (run 43340266748), where SaveVM hard-links the memory backing file into the snapshot; the chain's staged publication (position 028, PR11) copies it instead, writing only its chunks that are not all zero, and the copy's pages stay in the page cache. Onnvx-mshv-test(Azure Linux 3, kernel 6.18.34.mshv3),cargo xflowey vmm-tests-runreproduces the failure at63688dd58in both repetitions with the snapshot on ext4, and the test passes with the snapshot on tmpfs, with a hard-linkedmemory.bin, or with the copy's page cache dropped after the copy is flushed; it still fails when the copy writes every chunk. Which part of MSHV's mapping of those pages makes the difference is not established, so the fix follows the observed behavior: position 269 hascopy_exactdrop each independent copy's page cache on Linux withposix_fadvise(POSIX_FADV_DONTNEED)once the copy is flushed, logging a warning if that fails. That coversmemory.binand a paired scratch image, at capture and in a private-copy restore. NVX's templates publishmemory.binby hard link and pair no scratch, and the benchmarks' captures give OpenVMM neither a memory backing file nor a paired-scratch tier, so neither makes such a copy;test-microvm's paired-scratch captures and private-copy restores do.The other 34 upstream commits merge with the chain without conflicts.
What changed in NVX
0a86d8265): movesopenvmmfrom5ca20ee08to73cf40357. OpenVMM's manifests now carry field 18, whichmeshwrites even when the ID is zero, andnvx-rs's template manifest reader refuses fields that it does not know, so it accepts field 18 and checks only that it holds 16 bytes: a microVM capture leaves it zero, and a template depends on nothing in it. A manifest without it, of an earlier OpenVMM, still reads. The other vectors, excerpts, contract versions, and CPU profiles thatnvx-rscopies from OpenVMM match the pin.79e93568a): maps the rebased chain indoc/openvmm-upstream-roadmap.md. Positions from 003 on fall by the commits dropped before them (one through v6.0 position 007, three through 013, four through 050, seven from 054 on), so the commits after the mapped tip and the mapping now name each commit's v6.0 position. The mapped tip is position 124,7f31de535, and the pin is position 269, 145 commits past it. It records the drops, the conflicts and fixups, the open upstream pull requests as of 2026-11-13 (vmm_core: make level-triggered legacy IRQs explicit openvmm#4611 and virt_whp, petri: enable native PCIe NVMe boot on WHP openvmm#4615 closed, seven of the ten open ones drafts), and corrects a stale position, 219 for 211, in the retired PR09 entry.Validation
OpenVMM
With Rust 1.97.1, the toolchain of OpenVMM's CI:
rustfmt +1.97.1 --check --edition 2024on each changed.rsfile andcargo xtask fmt --pass lintspass at all 27, andcargo xtask fmt --pass verify-floweypasses at positions 002, 120, 121, and 179.cargo check --locked --workspace --all-targets(on Windows withoutvtpm_util, whose vendored OpenSSL needs a native Perl, andguest_test_uefiandopentmk_executor, which upstream's Clippy job checks for their UEFI targets alone) passes at positions 002, 006, 027, 028, and 266-269. From position 032 to 265 it fails only with the breaks that fixups 262-266 repair, classified error by error on both hosts: upstream's RestoreVM calls theread_snapshotthat position 031 replaced (until 264), the microVM loader calls the droppedloader::linux::microvm(until 263), the microVM capture and the benchmark lacksnapshot_id(until 265), the guest exit test's service lacks upstream's SaveVM state (until 266), and, on Windows, the peer identities and control console call the droppeduser_sidmodule (until 262).cargo xtask fmtpasses all of its passes;cargo clippy --workspace --all-targets -- -D warningspasses on Linux (with--all-features, withoutguest_test_uefiandopentmk_executor) and on Windows (also withoutvtpm_util);cargo nextest runof the 20 packages that the conflicts and fixups change or build on passes 1321 of 1321 tests on Linux, and on Windows 1206 of 1207 tests across 19 binaries, the exception beingsparse_mmap tests::test_shared_file_offsets_and_handle_lifetime, which fails on that host on upstreammain7d90c4104too. At position 268, which changes only a VMM test,cargo clippy -p vmm_tests --all-targets -- -D warningspasses on Windows. At position 269,cargo xtask fmtpasses all of its passes on Windows,cargo clippy -p openvmm_helpers --all-targets -- -D warningspasses on Linux and Windows, andcargo test -p openvmm_helperspasses 146 of 146 tests on Linux (nvx-kvm-testandnvx-mshv-test) and 138 of 138 on Windows.cargo xflowey vmm-tests-run --filter "test(microvm)"passes 6 of 6 on WHP (Windows 11) at position 267. Onnvx-mshv-test,cargo xflowey vmm-tests-run --filter "test(test_ttrpc_interface)" --repetitions 2, withTMPDIRon ext4, fails at63688dd58as OpenVMM CI did and passes both repetitions at73cf40357.vmm-tests-runcannot build that test's Linux artifacts on Windows.4a1d9b07a, passed the unit tests on x64 Linux and Windows, and its four required VMM test jobs each failed onlyttrpc::test_ttrpc_interface, withsave state not supported(KVM 108 of 109, MSHV 104 of 105, Windows Intel 281 of 282, Windows AMD 280 of 281), which position 268 fixes. Run 43398301692 on63688dd58passed the unit tests on x64 Linux and Windows and the KVM, Windows Intel, and Windows AMD VMM test jobs,ttrpc::test_ttrpc_interfaceincluded, and failed it in the MSHV VMM test job after RestoreVM, which position 269 fixes. Run 43410228612 on the pin,73cf40357, passes all six jobs that NVX requires, the MSHV VMM test job withttrpc::test_ttrpc_interfaceincluded. Two jobs that NVX does not require fail.run vmm-tests [x64-windows-amd-snp]fails 19 Hyper-V OpenHCL SNP tests; it fails 17-19 of them, a different set each time, on upstreammainat the base (run 43340266748) and on both earlier runs of this release.run vmm-tests [x64-windows-intel-tdx]fails four Hyper-V OpenHCL TDX tests (two intpm138, one intpm, one inmemstat): each guest boots, but its pipette never connects to the host (Operation timed out (os error 110)) until the test times out. That job passed on63688dd58, on the same runner, at 09:26 UTC, and since then the pin changes only Linux code, which the job's Windows binaries do not compile and OpenHCL, which does not useopenvmm_helpers, does not contain. A rerun on the pin failed three of the same tests in the same way, and a rerun of63688dd58's TDX job, which had passed there, now fails 30 Hyper-V OpenHCL tests on that runner, PCAT ones among them, with the same pipette timeouts: the runner changed, not the pin. Its vmm-perf jobs, which NVX does not require either, pass.NVX
python scripts\nvx.py verify,python scripts\openvmm_pin.py check-roadmap(269 positions, 278 references),python scripts\openvmm_pin.py check-branch --target origin/dev(two verified commits),python scripts\check_markdown_links.py, andgit diff --checkpass.python scripts\local_gates.py --base origin/dev --run --keep-going: at this head,test-changes,markdown-links,test-layout,openvmm-vectors(4 passed),openvmm-cpu-profiles(1 passed), andnvx-cli(2198 and 84 Python tests, OK, 88 and 11 skipped, withNVX_RSset and Git'susr\binonPATH) pass. At the first build of this branch,b1d982332, which has the samenvx-rs,nvx-rs-format,nvx-rs-lint,nvx-rs-test(2,724 passed, 38 ignored),nvx-rs-bundling(18 passed),nvx-rs-doc,nvx-rs-msrv,nvx-rs-adapter-protocol(50 passed), andnvx-rs-adapter-host(145 passed, 95 ignored) pass.openvmm-ciis left to CI. NVX CI of the previous head,253502cdd(run 43404057041), which has the samenvx-rsand pinned63688dd58, passed 33 jobs and skipped 8, and failed onlyOpenVMM CI of the pinned revision, on the MSHV job above, and theRequired status checkthat needs it.test-microvm:python3 scripts/nvx.py test-microvm --backend BACKEND, with OpenVMM built at the pin, passes 57 of 57 scenario runs at this head on KVM (nvx-kvm-test) and MSHV (nvx-mshv-test), both Azure Linux 3 virtual machines working on ext4, among them the paired-scratch captures and private-copy restores whose copies position 269 changes. On WHP (Windows 11, locally), it passed 57 of 57 atb1d982332, with OpenVMM built at4a1d9b07a, whose Windows build has the pin's code: position 268 changes only a VMM test, and position 269 only Linux code. On each Linux host,nvx-rs downloadfirst installed releasev0.1.0-dev.8bb7d532a10d, andpython3 scripts/nvx.py build-openvmmthen replaced its OpenVMM, as the changed SHA-256 andbuild/openvmm.provenance.json, which names73cf40357, show; other sessions' scenarios ran on those hosts at the same time.OpenVMM CI of the pinned revisionamong them, and the 8 that this pull request's run skips (publication, performance recording, the merge-group cancellation, and the debug-kernel microVM tests) are skipped.Tests modified
python scripts\check_test_changes.py --base origin/devlists five changes to existing tests, all for manifest field 18:ManifestSpec(nvx-rs/src/host/template/tests.rs) gainssnapshot_id,ManifestSpec::templatesets it to 16 zero bytes, andencode_withwrites it as field 18 after field 15, as OpenVMM'smeshencoding does, so every manifest test reads a manifest of the pinned OpenVMM.fields_that_the_format_does_not_have_are_refusedno longer expects field 18 to be refused, since the format now has it, and checks 19 and 20, which upstream reserves, instead.truncated_manifests_are_refusedskips the one prefix of the template's encoding that is a whole manifest, the one without field 18, which an earlier OpenVMM wrote and which reads.The new
only_the_length_of_the_snapshot_id_is_checkedcovers a manifest without the field and one with a nonzero ID, both of which read like the template, and refuses IDs of 0, 15, and 17 bytes.Equivalence
git range-diff ba105dd7f..5ca20ee08 7d90c4104..73cf40357pairs 261 of the 269 commits in order: 220 have identical patches, 16 differ by their resolutions, and 25 differ only in context. The seven dropped commits have no counterpart, and the eight fixups are new. No commit is reordered.5ca20ee08(git merge-tree --write-tree 5ca20ee08 7d90c4104), which conflicts in 21 files, in 43 files: those 21, the four workflows that the rebase regenerated, five files of the dropped commits, nine more that the fixups change, and four that the resolutions of positions 027, 183, and 221 change beside their conflicts.Landing order
73cf40357(run 43410228612).feature/microvm/release/v6.0was fast-forwarded fromcf6c03977to5ca20ee08, without force, so every revision of the old line that NVX pinned stays on a branch.feature/microvm/devmoved from5ca20ee08to the pin,73cf40357, with a lease on5ca20ee08, because.gitmodulestracks that branch:python scripts/openvmm_release.py land --remote origin --old-head 5ca20ee081c255bed107e58b6dc5b5b769b6101d --new-head 73cf403574a8907ee94dab0ab9d648152b832b05 --prev-release feature/microvm/release/v6.0 --push, aftercheck-openvmm-ciof the pin passed again.git ls-remoteshowsfeature/microvm/devandfeature/microvm/release/v6.1at73cf40357andfeature/microvm/release/v6.0at5ca20ee08. [DO NOT REVIEW] microvm: enable governed ARM64 cold boot on WHP openvmm#5045 now needs a rebase onto it.NVX head:
79e93568a9f8eafb2b88de372bf3b67ed1bbf22f, ondevat8bb7d532a10.