Repository navigation
openvmm: pin partition halt state across snapshots - #492
Merged
Pedro Henrique Penna (ppenna) merged 2 commits intoOct 12, 2026
Merged
Pedro Henrique Penna (ppenna) merged 2 commits into
Pedro Henrique Penna (ppenna) merged 2 commits into
Conversation
70dde4c65 (fix/snapshot-halt-state in nanvix/openvmm, nanvix/openvmm#129) stacks on 2130f24b5, which dev already pins and nanvix/openvmm main holds. It is Ruize Tang's 320f31ff7 rebased onto main without conflicts, with the fixes for that pull request's review folded in. A partition that halted before a snapshot, because the guest powered off, reset, or triple-faulted, or because a debugger stopped it, saved no halt reason, and its restore left halted state as a TODO. The restored partition therefore ran its vCPUs again and reported no halt, so a guest could continue past a power-off that it had already requested. The partition's saved state now records the first halt reason in an optional field. A restore latches the vCPU halt again and reports the halt to the client, or to an attached debugger, as the original halt did, so the VM controller applies its guest power action to it. A restore over a halt that the partition recorded, or that a vCPU raised but the partition has not recorded yet, fails before it restores any state instead of merging the two. A partition that is not halted saves no halt reason, so its saved state keeps the bytes that it had before and existing snapshots restore as they did. A build without this change skips the unknown field and restores a halted snapshot unhalted, as before. Unit tests cover the saved field, the vCPU halt latch, and the save and restore of halted and running partition units. nvx.py verify passes with this pin. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The upstream roadmap indexes the OpenVMM commits between its mapped tip and NVX's pin, which moves from 2130f24b5 to 70dde4c65. Record the new pin, extend the branch DAG to position 309, and add position 309, which saves a halted partition's halt reason in its snapshots and latches and reports that halt again on restore. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The runtime snapshot change requires human approval after the upstream dependency merges and exact-head CI completes.
0 open findings
What changed in this PR
Pins OpenVMM’s snapshot halt-state fix and records the new upstream position.
Changes:
- Updates the OpenVMM gitlink to
70dde4c65. - Preserves and re-reports partition halt state after restoration.
- Adds roadmap position 309 for the pinned commit.
| File | Description |
|---|---|
openvmm |
Pins the halt-state snapshot implementation and tests. |
doc/openvmm-upstream-roadmap.md |
Updates pin metadata, counts, and roadmap position. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Pedro Henrique Penna (ppenna)
deleted the
agents/bump-openvmm-submodule-and-rebase-e4b7a845
branch
October 12, 2026 19:27
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.
Pin OpenVMM
70dde4c65from nanvix/openvmm#129, which preserves a partition's halt state across snapshots: a partition that halted before its snapshot now restores halted and reports its halt again, instead of restoring with runnable vCPUs and no halt report.Problem
When the guest powers off, resets, or triple-faults, or a debugger stops it, OpenVMM's partition unit records the first
HaltReason, latches every vCPU stopped, and reports the halt to the client or to an attached debugger. The partition's saved state had no field for that halt (// TODO: save halted state), and its restore left it out (// TODO: restore halted state). A snapshot of a halted partition therefore restored with runnable vCPUs and reported nothing, so the guest could run past a power-off that it had already requested.Change
The
openvmmgitlink moves from2130f24b5to70dde4c65, one commit on nanvix/openvmmmainat2130f24b5, whichdevalready pins. Invmm_core's partition unit, it:partition.Partitionsaved state;A partition that is not halted saves no halt reason. mesh writes nothing for an absent optional field, so its saved state keeps the same bytes and existing snapshots restore as before, and a build without this change skips the unknown field and restores a halted snapshot unhalted, as it did. NVX microVM captures are requested by the running guest through PMIO
0x605, so a captured partition is halted only if a halt raced the capture.The second commit records the new pin in
doc/openvmm-upstream-roadmap.mdas position 309, as #475 did for the previous pin.Provenance
320f31ff7, on7bf0ee28b, three commits behind nanvix/openvmmmain. Its SSH signature is cryptographically valid, but its key is not in my allowed signers, so the signer's identity is unverified.mainat2130f24b5without conflicts.git range-diff 7bf0ee28b..320f31ff7 2130f24b5..<rebased>reported the commit unchanged (=), and both versions have the stable patch IDe067c6fa9.fix/snapshot-halt-statewith a lease on the reviewed head, and replied to and resolved each thread. The result,70dde4c65, keeps Ruize Tang (@tangruize) as its author. It is therefore not patch-equivalent to the reviewed320f31ff7: besides the new tests,vp_set.rskeeps one copy of the halt-latch guard and names theHalthelpersvalidate_restore_haltandrestore_halt, like theVpSetmethods that call them, with the same behavior.Dependencies
70dde4c65preserved before this PR merges.Validation
OpenVMM at
70dde4c65, with Rust 1.95.0 on Windows:cargo clippy --all-targets -p vmm_core(with and without--all-features, and with--tests --target aarch64-pc-windows-msvcfor the aarch64 test topology),cargo doc --no-deps -p vmm_core,cargo nextest run -p vmm_core(40 passed, with and without--all-features), andcargo xtask fmt --fixpass.NVX at
cc02b7329, with OpenVMM built from70dde4c65bybuild-openvmmon each host and the guest artifacts of thev0.1.0-dev.c29f3d1b0329release, whose guest inputs this PR does not change.scripts/nvx.py verifypasses on every host.test-microvm(39 runs)managed-exec-config,sandbox-lifecycletest-aci-edge-sandboxesThe release packages do not include the sandbox scratch template, so the exec and lifecycle scenarios used one made with CI's
mkfs.ext4recipe.Not run locally:
test-openvmm-unit,test-openvmm, the--debug-kernelsuite,verify-guest-determinism, andbenchmark, which the CI matrix runs. Head:cc02b732989cbaf91400b7711e9e002c8aaac104.