Skip to content

openvmm: pin the PCI transport's restore tests - #1451

Merged
Pedro Henrique Penna (ppenna) merged 2 commits into
devfrom
agents/issue-1232-device-restoration
Nov 10, 2026
Merged

Pedro Henrique Penna (ppenna) merged 2 commits into
devfrom
agents/issue-1232-device-restoration

Conversation

@ppenna

Copy link
Copy Markdown
Contributor

Part of #1232

What and why

#1232 asks for the virtio restore contract on both the PCI and MMIO
transports, with tests of re-save, reset, and removal before the first start.
Position 039 of the microVM chain, which restores a device's private state
into the stopped device for #1232, promises two parts of that contract on both
transports: a restore rejects an enabled queue of a DRIVER_OK device that
lacks its progress, before the device sees any state; and a save before the
first start returns the restored queue progress and private state. Only the
MMIO transport tested either for an active device. #1308 added the PCI
counterpart of the removal test, but not these. And the module documentation
of the virtio-net saved-state tests still described the deferred restore of
device-private state that position 039's rewrite retired. No product code is
wrong: this completes the tests and the documentation.

microsoft/openvmm#5016 is one commit on a8a0e3517, the head of
feature/microvm/dev:

  • cd5cd3814, virtio: test PCI re-save before start and missing queue progress, adds pci_restore_rejects_missing_active_queue_progress and
    pci_resave_before_first_start_keeps_restored_state, and corrects the
    virtio-net test module's documentation. It changes only tests.

This pull request:

#1232 after this pull request

Met on dev (705412fdd, OpenVMM a8a0e3517), as #1232's latest status
comment records, and since then:

Left open, each blocked outside this repository:

Outside the microVM's reach: upstream's remote chipset device proxy still
panics when its device worker ends during a stop or a reset. Only the TPM uses
a remote device worker.

Decisions:

Landing order: land microsoft/openvmm#5016 first, by fast-forwarding
feature/microvm/dev to the exact pinned revision,
cd5cd38149419c99a31564631ce6cb6e149a2a7a, since OpenVMM's merge button
squashes and would leave the pin off the branch; then merge this pull request.

Validation

Locally, on Windows, OpenVMM at the pin:

  • cargo check, cargo clippy --all-targets, cargo doc --no-deps with
    RUSTDOCFLAGS=-D warnings, and cargo nextest run --profile agent for
    -p virtio -p virtio_net: 226 passed and 1 skipped, without warnings;
    cargo xtask fmt --fix changed nothing.
  • The new tests fail, as their MMIO counterparts do, when the restore no
    longer requires the progress of an enabled DRIVER_OK queue
    (validate_restored_state), or when a stop before the first start drops
    the restored progress of a queue that never started (capture_stop).
  • python scripts\local_gates.py --base origin/dev --run: test-changes (0
    changes to existing tests), markdown-links, test-layout, openvmm-vectors,
    and openvmm-cpu-profiles passed. nvx-cli ran 2188 tests, skipping 88, and
    7 subtests of two guest-script tests in scripts/test_microvm_tests.py,
    test_host_loopback_allow_script_checks_publication_and_traffic and
    test_private_network_ingress_script_checks_policy_and_traffic, hit their
    10-second limit under Git's sh on this loaded machine. They time out the
    same way at origin/dev there, and this pull request changes no script.
    openvmm-ci is left to CI.
  • python scripts\openvmm_pin.py check-branch --topic and
    check-roadmap --worktree, and python scripts\nvx.py verify, passed.
  • A code-review agent found one problem, an overclaim in the OpenVMM commit's
    message, which was fixed before the commit was pushed.

Hosts, OpenVMM's virtio and virtio_net tests:

Profile Backend Host type Before, at a8a0e3517 After, at the pin
nvx-kvm-test kvm virtual-machine neither PCI test exists 226 passed, 1 skipped
nvx-mshv-test mshv virtual-machine not run: same Linux tests as on nvx-kvm-test, without a hypervisor not run
nvx-whp-test whp virtual-machine not run: same Windows tests as locally, without a hypervisor not run

No microVM scenario is affected: the change has no product code, so the
openvmm binary at the pin behaves as at a8a0e3517. Left to CI: the full
matrix that a gitlink change selects, and openvmm-ci, which requires OpenVMM's
CI of the pin.

check_test_changes.py lists no change to existing NVX tests. In OpenVMM, only
the module documentation of the virtio-net saved-state tests changes, and no
existing test.

#1232 requires the virtio restore contract on both
transports: a restore rejects an active queue that lacks its progress
before the device sees any state, and a save before the first start
returns the restored queue progress and private state. Only the MMIO
transport tested either for an active device.

Pin cd5cd3814, which microsoft/openvmm#5016 proposes for
feature/microvm/dev: one commit on a8a0e3517, the head of that branch.
It adds the PCI counterparts of those two tests, and corrects the
module documentation of the virtio-net saved-state tests, which still
said that an inactive transport defers the device-private state until
the device is activated. It changes no product code.

The control-session vectors, the source excerpts, the contract
versions, and the CPU profiles that nvx-rs copies from OpenVMM match
the revision's.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The NVX pin moves to cd5cd3814, position 246, 115 commits past the
mapped tip. Position 246, which microsoft/openvmm#5016 proposes for
feature/microvm/dev on its head, a8a0e3517, is unassigned. It adds the
PCI counterparts of two MMIO tests of the virtio restore: a restore
whose active queue lacks its progress fails before the device sees any
state, and a save before the first start returns the restored queue
progress and private state. It also corrects the module documentation
of the virtio-net saved-state tests, which still described the
deferred restore of device-private state. The Scope also says that
microsoft/openvmm#5013 merged positions 243-245.

Position 246 changes only the test modules of PR13's positions 039 and
048, the first of which positions 213 and 218 also extend. On upstream
main, both of its files conflict, since upstream main lacks both test
modules, so it follows PR13 upstream.

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.

🟢 Approval recommended

No active review issues are reported for the roadmap update documenting PCI restore test coverage and its upstream dependency.

No open issues 🎉

What changed in this PR

Updates the OpenVMM roadmap to track the test-only revision that adds PCI restore coverage for #1232, without changing product behavior.

Changes:

  • Records pin cd5cd3814 at position 246, 115 commits beyond the mapped tip.
  • Documents the PCI tests for missing active-queue progress and re-saving before first start, plus the virtio-net test documentation correction.
  • Records position 246’s dependency on PR13 for upstreaming.
File Description
doc/​openvmm-upstream-roadmap.md Updates the pin, chain counts, and position 246 mapping with its test scope and upstream dependencies.

Review effort: Balanced

@ppenna
Pedro Henrique Penna (ppenna) added this pull request to the merge queue Nov 10, 2026
Merged via the queue into dev with commit cbc20e0 Nov 10, 2026
47 checks passed
@ppenna
Pedro Henrique Penna (ppenna) deleted the agents/issue-1232-device-restoration branch November 10, 2026 17:12
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