Repository navigation
openvmm: pin new microVM objects that take the last node ID - #2144
Merged
Pedro Henrique Penna (ppenna) merged 2 commits intoNov 25, 2026
Merged
Conversation
A microVM's FUSE_MKDIR, FUSE_MKNOD, FUSE_SYMLINK, or FUSE_CREATE that reserved the last node ID that the node table hands out, u64::MAX - 1, made its object on the host and then failed with ENOSPC, so the guest saw the request fail while the object stayed on the host without a node, and each retry under another name left another such object (#2135). A restore reaches that state, since it accepts any next node ID above the saved ones. Pin microsoft/openvmm 350018ce4335ba60ad722852f4004f90674f69e9, the head of microsoft/openvmm#5281, one commit on 1633b3797, the head of feature/microvm/dev, which NVX pins below this commit: - virtiofs: let a new microVM object take the last node ID. The insert of a node with the ID that its request reserved checks the microVM's inode and alias limits as before, but no longer requires that the table can hand out another node ID after the reserved one. Its test fails without the fix, for FUSE_MKDIR, and passes with it, on Windows and on Linux, and the virtiofs package's tests pass at the pin on both. No saved-state, protocol, or ABI format, and no version of any of them, changes. The protocol vectors and CPU profiles that nvx copies are unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Position 389 remains unassigned rather than included as a PR18 fixup to 081, leaving its adaptations, test placement, and related roadmap updates unresolved.
1 open issue
What changed in this PR
This PR pins an OpenVMM fix for #2135 so microVM virtio-fs creation requests can use the last reserved node ID without failing after creating an object on the host.
Changes:
- Records OpenVMM revision
350018ce4at chain position 389. - Updates roadmap counts and history, and documents the fix’s dependencies and upstream limitations.
| File | Description |
|---|---|
doc/openvmm-upstream-roadmap.md |
Updates the pin metadata and maps the last-node-ID fix into the OpenVMM roadmap. |
Review effort: Balanced
5 tasks done
…M roadmap Map position 389, the commit of microsoft/openvmm#5281, which NVX now pins at 350018ce4, 263 commits past the mapped tip, on 1633b3797, position 388, the head of feature/microvm/dev since microsoft/openvmm#5280 landed positions 386-388: - 389, virtiofs: let a new microVM object take the last node ID. The insert of the node of an object that FUSE_MKDIR, FUSE_MKNOD, FUSE_SYMLINK, or FUSE_CREATE makes, with the node ID that the request reserved before it made the object, no longer requires that the table can hand out another node ID, so that the object takes the last node ID, u64::MAX - 1, rather than stay on the host without a node after the request fails with ENOSPC (#2135). The inode and alias limits still apply to that insert. Position 389 is a PR18 fixup. It fixes a defect of PR18's position 081, whose InodeReservation::insert check required another free node ID, which position 083's restore makes reachable and position 350 moved to u64::MAX - 1, and it needs nothing that a later position adds but, for its test, position 350's table and position 164's helpers. Fold it into position 081, where its changes of lib.rs and limits.rs apply as they are, as git merge-tree shows, and its test into position 350, where only the imports conflict: at 301937559, position 350, with the fix and the test so placed, the virtiofs tests pass on Windows, and without the fix the test fails. The Scope, the DAG, the fold sentences, the PR summary, the dependency graph, and the commit mapping record the fixup. Of positions 372-388, only 385 changes one of its files, fs_tests.rs. Upstream main, 8d4e03132, lacks the defect, since it lacks the microVM's limits, and replaying the commit there conflicts in lib.rs and in the microVM's limits.rs and fs_tests.rs, so it follows PR18 upstream. The Scope also records that microsoft/openvmm#5277, microsoft/openvmm#5278, microsoft/openvmm#5279, and microsoft/openvmm#5280 have landed positions 383-388 on feature/microvm/dev. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pedro Henrique Penna (ppenna)
force-pushed
the
agents/issue-2135-virtiofs-last-node-id
branch
from
November 25, 2026 17:06
0c97865 to
8bfe42a
Compare
5 tasks done
This was referenced Nov 25, 2026
Pedro Henrique Penna (ppenna)
deleted the
agents/issue-2135-virtiofs-last-node-id
branch
November 25, 2026 18:39
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.

Fixes #2135
What does this pull request change?
A microVM guest's
FUSE_MKDIR,FUSE_MKNOD,FUSE_SYMLINK, orFUSE_CREATEon a read-write virtio-fs share, made when the share's node table had only its last node ID,u64::MAX - 1, left to hand out, made its object on the host and then failed withENOSPC. The guest saw the request fail while the object stayed on the host without a node, and every retry under another name left another such object. Now the object takes that node ID and the request succeeds; the next request that needs a node fails withENOSPCbefore it changes the host, as Nodes, Handles, and Listings already says: the server checks its bounds before it changes the host, and node IDs stop one below their 64-bit maximum. A restore reaches that state, since it accepts any next node ID above the saved ones; live requests would need some 2^64 allocations.The fix is in OpenVMM, microsoft/openvmm#5281, which this pull request pins:
virtiofs: let a new microVM object take the last node ID.InodeReservation::insert(vm/devices/virtio/virtiofs/src/lib.rs), which inserts the node of the object that one of these requests made, with the node ID that the request reserved before it made the object, now checks the insert with a newInodeMap::preflight_microvm_reserved_insert(microvm/limits.rs). It shares the code ofpreflight_microvm_insertand skips only its check that the table can hand out another node ID; the inode limit, the alias limits, the path checks, and their order are unchanged. One regression test inmicrovm/fs_tests.rs.The NVX commits are the gitlink-only pin and the mapping of the commit, position 389, in the OpenVMM roadmap. Start with the OpenVMM diff:
git diff --submodule=diff origin/dev...HEAD.Left out and limitations:
FUSE_LOOKUP's, keep the check of the next node ID, so a full table still refuses them first. File handles were not affected: their reserved insert already checked only the handle limit.Why is this change needed?
A guest whose request fails believes that nothing happened, so the share kept objects that the guest never learned of, one more per retry, and the next save recorded neither them nor the node that the request should have returned.
Root cause: these requests reserve the node ID of their object before they make it, so that a full table refuses them before the host changes, and then insert the object's node with that ID. Position 081 of the microVM chain (
dbf0fa400, PR18 of the OpenVMM roadmap) hasInodeReservation::insertcheck that insert withInodeMap::preflight_microvm_insert, which, for a node of its own, also requires that the table can hand out its next node ID. The reservation has already taken that ID, so the check asked about the ID after it. After a reservation ofu64::MAX - 1, the table's next node ID isu64::MAX, whichHandleMap::can_insertnever hands out, so the insert failed although it needed no other ID. Position 083's restore, which accepts any next node ID above the saved ones, makes that state reachable, and position 350 (301937559, #1627), which stopped the tables from handing outu64::MAX, moved the failure from a reservation ofu64::MAXto one ofu64::MAX - 1.Alternatives rejected:
reservedflag throughpreflight_microvm_insert, is the approach taken, adapted to the current code: the flag reaches only the new-node check, and the pre-host check,preflight_microvm_new_inode, keeps its signature and behavior.retyped_object_is_refused_at_the_inode_limitchecks for a reserved insert at the inode limit.FUSE_CREATEthat opened and truncated an existing file.u64::MAX: it is the synthetic aggregate root's directory handle, and a table that hands it out wraps its next ID to 0, which a restore rejects (openvmm: virtiofs: HandleMap::can_insert hands out u64::MAX, colliding with SYNTHETIC_ROOT_FH #1627).How was this change validated?
Checks and results. "Before" is OpenVMM
1633b3797, the head offeature/microvm/devand NVX's pin ondev, with the new test; "after" is the pin,350018ce4, on Windows 11 Enterprise (local workstation, NTFS) and on a Linux KVM test VM (Azure Linux 3, kernel 6.18, x86_64, tmpfs), where the same patch was applied on1633b3797.cargo nextest run --profile agent -p virtiofs -E 'test(a_created_object_takes_the_last_node_id)'(new test), on Windows and LinuxFUSE_MKDIRreturnsENOSPCinstead of nodeu64::MAX - 1FUSE_MKDIR,FUSE_MKNOD,FUSE_SYMLINK, andFUSE_CREATEtwice, under two names, after a restore whose next node ID isu64::MAX - 1, then a save, on Windows and LinuxENOSPCand leaves its object on the host, both times; the save records no new node and the next node IDu64::MAX - 1u64::MAX - 1; the second fails withENOSPCand leaves nothing on the host; the save records the node and the next node IDu64::MAXcargo check,cargo clippy --all-targets, andcargo doc --no-deps, each-p virtiofscargo nextest run --profile agent -p virtiofscargo xtask fmt --fixcargo test --locked --manifest-path nvx/Cargo.toml --no-default-features --test openvmm_vectors -- --ignored, and the same with--test openvmm_cpu_profilesnvxcopies are unchangedpython scripts/openvmm_pin.py check-branch --topic --target origin/dev,python scripts/openvmm_pin.py check-roadmap --worktree,python scripts/check_markdown_links.py,git diff --checkcargo nextest run --profile agent -p virtiofsat301937559with the fix and the test, whose imports are re-expressed there, on WindowsFUSE_MKDIRreturnsENOSPCpython scripts/local_gates.py --base origin/dev --run --only test-changes markdown-links test-layout openvmm-vectors openvmm-cpu-profilespython scripts/nvx.py check-openvmm-ci --revision 350018ce4335ba60ad722852f4004f90674f69e9Backend, host OS, host type, and guest: no microVM run. A guest reaches the defect only after a restore of a hand-edited saved state, which no scenario makes, and the change leaves every other path as it was, so the unit tests above cover it on Windows and Linux.
Left to CI: the microVM scenarios on KVM, MSHV, and WHP, and the NVX CLI jobs, including the
nvx-cligate's Python tests, which this branch does not change. OpenVMM's CI of the pin, run 45656335609, passed the six jobs that NVX requires on its first attempt.NVX CI run 45661136291 of the head
8bfe42a45ebpassed, its KVM, MSHV, and WHP microVM jobs, its platform jobs, and its NVX CLI jobs on Linux and Windows among them.Checklist
python3 scripts/check_test_layout.pychecks.python3 scripts/check_test_changes.py --base origin/devlists no changeto an existing test, or a Changes to existing tests section below
explains each one.
.github/copilot-instructions.mdand the skills when a convention orworkflow changes.
nvxupdatesnvx/public-api/withpython3 scripts/public_api.py --update.description says how the change versions or migrates them.
Changes to existing tests
None:
python scripts/check_test_changes.py --base origin/devlists no change to an existing test, and the OpenVMM pull request adds one test, and the three imports that it uses, tomicrovm/fs_tests.rs, and changes no test.OpenVMM pin
350018ce4335ba60ad722852f4004f90674f69e9, one commit on1633b3797, the head offeature/microvm/devand NVX's pin ondev.feature/microvm/dev.1633b3797.InodeReservation::insertcheck it fixes, and its test into position 350, whose node table never hands outu64::MAX. Its changes oflib.rsandlimits.rsapply at position 081 as they are, asgit merge-treeshows, and at301937559, position 350, with the fix and the test placed so, thevirtiofstests pass on Windows (224 passed, 3 skipped), and without the fix the test fails. It follows PR18 upstream: upstream main,8d4e03132, lacks the microVM's limits, and replaying the commit there conflicts.nvxcopies are unchanged.feature/microvm/devexactly to350018ce4335ba60ad722852f4004f90674f69e9, not with the merge button, which squashes, before this pull request merges.python scripts/openvmm_pin.py land 350018ce4335ba60ad722852f4004f90674f69e9 --remote originfinds that fast-forward.