Skip to content

openvmm: pin the snapshot VM clock cut - #491

Merged
Pedro Henrique Penna (ppenna) merged 1 commit into
devfrom
agents/bump-openvmm-submodule-and-rebase
Oct 12, 2026
Merged

Pedro Henrique Penna (ppenna) merged 1 commit into
devfrom
agents/bump-openvmm-submodule-and-rebase

Conversation

@ppenna

@ppenna Pedro Henrique Penna (ppenna) commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Pin openvmm to d43dd87d5b9c27109c71100accb5b2790416acb4, from nanvix/openvmm#128 rebased onto the latest OpenVMM main (70dde4c65), and update the NVX time ABI specification and upstream roadmap.

NVX head: 29395bdf45672a311f1fb4580677f526bd9607cf, one signed commit directly on dev at d206d618ffc5f84fd7852c8b730bafe29acca3ab.

The primary VM time keeper records the host monotonic clock at the VM-time cut. Capture stores the cut-to-anchor interval Q in optional SnapshotTimeContract field 12, vm_time_cut_to_anchor_ns. Restore advances VM time and the RTC by D + Q; the TSC, LAPIC timers, and restore packet retain the anchor-to-restore downtime D. The combined duration remains bounded by 30 days. Capture warns and omits unavailable cut metadata; snapshots without it retain the previous anchor-only behavior with a warning. Manifest version 6 is unchanged.

Rebase and provenance

Item Revision or result
Source PR nanvix/openvmm#128, branch fix/snapshot-clock-cut
Previous validated source head 6d6e9c1e860519f339a0d21f62aaae058f2ee0a9 on 2130f24b5
Latest source default 70dde4c65b16de084744b0fa85aeb581f0b5c6cd
Rebased source commits 9b2073ded and d43dd87d5
Rebased pin d43dd87d5b9c27109c71100accb5b2790416acb4
Latest NVX default at publication d206d618ffc5f84fd7852c8b730bafe29acca3ab
Signatures Both rebased source commits and the NVX commit verify locally with the configured signing key; source author and co-author trailers are preserved

The OpenVMM rebase applied without conflicts. git range-diff 2130f24b5..6d6e9c1e8 70dde4c65..d43dd87d5 reports both commits as =. The complete diffs against their respective bases share stable patch ID 8b563430cc7079186a2019aac1c321ccc5ff8ea2. This proves patch equivalence to the previously validated source head, not tree identity, because the base includes an additional commit.

The original reviewed head b435a486b was previously rebased and amended after review of this NVX PR: the cut uses host monotonic time instead of UTC, and the primary keeper samples at the stop rather than around an asynchronous round trip. The regression test for a host wall-clock step is preserved unchanged by this rebase. The final pin is not claimed to be equivalent to that original, pre-fix head.

nanvix/openvmm#129 is now merged into main, and NVX already pins its halt-state fix through #492. This rebase retains it; it is no longer excluded. The gitlink fast-forwards the current NVX pin by exactly the two clock-cut commits, with no new prerequisite PRs.

Scope

  • openvmm: 70dde4c65..d43dd87d5.
  • doc/design/time-abi.md and doc/design/snapshot-and-restore.md: preserve the clock-cut specification updates.
  • doc/openvmm-upstream-roadmap.md: retain the upstream halt-state entry at position 309 and record the clock-cut commits at positions 310-311; the pin is now 145 commits past the mapped tip.

The NVX rebase resolves the gitlink and roadmap conflicts with the combined source revision and preserves all other upstream changes. No implementation files, guest inputs, or performance baselines are changed by this PR.

Validation after this rebase

  • python scripts\nvx.py verify: passed on the final NVX head.
  • OpenVMM cargo check, cargo clippy --all-targets, cargo doc --no-deps, and cargo nextest run --profile agent passed on exact source head d43dd87d5, for openvmm_core, openvmm_defs, openvmm_entry, openvmm_helpers, vmcore, and vmm_core: 500/500 tests passed. The existing crypto backend build-script warning remains; no gate failed.
  • cargo xtask fmt --fix: passed and left the source clean.
  • NVX Python compilation and the affected CLI, snapshot, and timing regression suites: 775 tests run, 82 skipped, no failures. They ran on 41422f08d; the subsequent rebase absorbed only dev's baseline CSV update. An exact diff confirmed the tested code, documentation, guest, kernel, and submodule inputs are unchanged in the final head.

No fresh local VM boot or remote bare-metal suite was run for this rebase. The previous local and KVM/MSHV/WHP bare-metal evidence covers b168e9d76 with source 6d6e9c1e8, and is historical rather than an exact-head claim for this combined revision.

Previous exact-head CI: successful run 38166311023 on b168e9d76. These prior results do not substitute for the rebased head's checks.

Current exact-head CI: successful run 38299887059 on 29395bdf4. The full matrix passed, including the OpenVMM unit and VMM suites, KVM/MSHV/WHP microVM and platform jobs, KVM debug-kernel tests, performance gate, and required status check. Release publication and performance-history persistence remain skipped for this pull request, as intended.

NVX head submitted to CI: 29395bdf45672a311f1fb4580677f526bd9607cf.

Copilot AI balanced review requested due to automatic review settings October 11, 2026 18:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

UTC clock steps during capture can produce an incorrect Q and substantial guest clock divergence.

1 open finding
What changed in this PR

Pins OpenVMM’s snapshot clock-cut fix and aligns NVX’s time ABI documentation.

Changes:

  • Records and applies VM-time cut-to-anchor interval Q.
  • Documents restore semantics and compatibility.
  • Updates the OpenVMM upstream roadmap.
File Description
openvmm Advances the submodule to the clock-cut fix.
doc/​design/​time-abi.md Specifies Q, validation, capture, and restore behavior.
doc/​design/​snapshot-and-restore.md Updates the restore sequence.
doc/​openvmm-upstream-roadmap.md Records the new pin and commits.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread doc/design/time-abi.md Outdated
Copilot AI balanced review requested due to automatic review settings October 11, 2026 18:37
@ppenna
Pedro Henrique Penna (ppenna) force-pushed the agents/bump-openvmm-submodule-and-rebase branch from f3b78e3 to 274f4f0 Compare October 11, 2026 18:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The stop-time sampling can be significantly biased by scheduling delays, and the PR description still documents the superseded revision.

2 open findings
1 resolved since last review

🧠 Review effort: Balanced

Comment thread doc/design/time-abi.md Outdated
Comment thread doc/openvmm-upstream-roadmap.md Outdated
Copilot AI balanced review requested due to automatic review settings October 11, 2026 19:02
@ppenna
Pedro Henrique Penna (ppenna) force-pushed the agents/bump-openvmm-submodule-and-rebase branch from 274f4f0 to b168e9d Compare October 11, 2026 19:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

It changes cross-platform snapshot clock semantics, while exact-head runtime validation and CI remain in progress.

0 open findings

2 resolved since last review

🧠 Review effort: Balanced

d43dd87d5 (nanvix/openvmm#128, rebased onto main at 70dde4c65) keeps VM
time and the RTC in step with the guest TSC across a microVM snapshot.
Capture quiesces the state units, which stops VM time and the RTC,
before it takes the time ABI capture anchor, while the guest TSC keeps
running. Restore advanced VM time and the RTC by the anchor-to-restore
downtime D alone, so they resumed behind the TSC by the interval from
that cut to the anchor.

VM time's keeper now reads the host monotonic clock that the capture
anchor samples at the instant VM time stops and saves the reading with
VM time's state, and capture records the interval Q from that cut to
the anchor's host monotonic time in the time contract's new optional
field 12, vm_time_cut_to_anchor_ns, so that a host wall-clock step
cannot enter it. Restore advances VM time and the RTC by D + Q, while
the TSC, the LAPIC timers, and the restore packet keep D, and it
rejects a recorded Q or a D + Q above 30 days with E_DOWNTIME_EXCESSIVE.
Recording Q is best effort: capture logs a warning and omits it when the
saved stop sample is missing or Q would be negative or above 30 days,
and a snapshot without it, including every earlier one, restores with
Q = 0 and a warning. Manifests stay at version 6.

The time ABI specification follows: its notation defines Q, and
Downtime semantics, capture step 4, the SnapshotTimeContract table,
restore steps 2, 5, and 15, E_DOWNTIME_EXCESSIVE, and the Guide appendix
describe it. Snapshot and restore's restore sequence advances VM time,
the RTC, and the PIT by the downtime plus Q. The upstream roadmap
records the new pin, retains the partition halt-state fix at position
309, extends the branch DAG to position 311, and indexes the clock-cut
commits at positions 310 and 311.

The original reviewed head b435a486b was rebased and amended after
review of this pin: Q uses the host monotonic clock rather than UTC,
and the primary keeper reads it where it computes the stop time rather
than around the asynchronous stop. This preserves the fixes for host
wall-clock steps and scheduling delays, including the regression test.

Rebase the validated source head 6d6e9c1e8 onto the latest OpenVMM main
70dde4c65 without conflicts. Both commits match in git range-diff and
the complete diffs against their bases share stable patch ID
8b563430cc7079186a2019aac1c321ccc5ff8ea2. The new pin retains
nanvix/openvmm#129's partition halt-state fix, now part of both default
branches, and fast-forwards the current NVX pin by exactly two commits.
Rebase this single NVX commit onto dev at d206d61, preserving the
upstream changes and resolving the gitlink and roadmap conflicts with
the combined revision.

On the rebased source, cargo check, clippy, rustdoc, all 500 unit tests,
and xtask fmt pass for the five clock-cut packages and vmm_core. NVX
verification and the affected CLI, snapshot, and timing tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The change affects cross-platform VM time restoration, and the exact-head runtime matrix remains pending.

0 open findings

🧠 Review effort: Balanced

@ppenna
Pedro Henrique Penna (ppenna) merged commit 9046016 into dev Oct 12, 2026
32 checks passed
@ppenna
Pedro Henrique Penna (ppenna) deleted the agents/bump-openvmm-submodule-and-rebase branch October 12, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants