Repository navigation
XMem: title-placed reservations are write-watched only when asked for (Series S boot, #3023) - #3126
Open
TheSovietWaffle wants to merge 1 commit into
Open
TheSovietWaffle wants to merge 1 commit into
TheSovietWaffle wants to merge 1 commit into
Conversation
TheSovietWaffle
force-pushed
the
fix/series-s-watch-placed
branch
from
November 29, 2026 22:16
3316cf2 to
59be640
Compare
moritz-eckhard-nickel
added a commit
to moritz-eckhard-nickel/VIctory-NVIDIA
that referenced
this pull request
Nov 30, 2026
…s are write-watched only when asked for (Series S boot, trustno1-coder#3023) trustno1-coder#3126 by TheSovietWaffle, head 59be640.
On the Series S the title's 3977 MB pool at 0x2000000000 made VirtualAlloc2 with MEM_WRITE_WATCH never return (v2026.11.29.01, trustno1-coder#3023): the profile hangs before the menu and the process cannot be killed. The reporter bisected it to 7832421 and booted a build with watch_placement forced false. Keep that path, but off by default: VICTORY_WATCH_PLACED_XMEM=1 asks for the watch to keep testing it. Host-placed reservations are watched as before, and placeholders and a watch the title asked for itself are honoured as asked. The predicate is a unit-tested function; the switch is read once, like VICTORY_WATCH_LARGE_XMEM beside it.
TheSovietWaffle
force-pushed
the
fix/series-s-watch-placed
branch
from
November 30, 2026 00:37
59be640 to
92458a4
Compare
JustOptimize
added a commit
to JustOptimize/VIctory-Enhanced
that referenced
this pull request
Nov 30, 2026
… (PR trustno1-coder#3126) Port of trustno1-coder#3126, applied clean. Series S boot hang (trustno1-coder#3023): placed reservations are no longer MEM_WRITE_WATCH by default; VICTORY_WATCH_PLACED_XMEM=1 brings the old behaviour back. Host-placed reservations are watched as before. Upstream: unit test only, and the author's smoke run did not take the title-placed path, so the fix itself is untested there. On this PC the big pool may be host-placed, in which case nothing changes.
JustOptimize
added a commit
to JustOptimize/VIctory-Enhanced
that referenced
this pull request
Nov 30, 2026
…he state of CI on fork/main
1 task done
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.
Addresses #3023. The kernel stall itself is not explained here; this removes it from the default path and keeps the title-placed watch testable.
What it changes
78324212gave title-placed reservationsMEM_WRITE_WATCHby default. On the Series S the title's 3977 MB pool at0x2000000000goes throughVirtualAlloc2with that watch and never returns, so the profile hangs before the menu, the thread stays in the kernel, and the process cannot be killed. The reporter in #3023 bisected it to that commit and booted a build withwatch_placementforced tofalse(a one-line change); that is the evidence this change is built on.Comparing the last good build, v2026.11.28.03, with
main, the write-watch change inxmem.rsis this branch:.28.03watched only host-placed allocations (if constrained { ... kind |= MEM_WRITE_WATCH }). Unset now restores exactly that, and the switch keeps the newer path available.This makes that path opt-in instead of default:
VICTORY_WATCH_PLACED_XMEM=1: ask for the watch, as v2026.11.29.02 did, so the title-placed path can keep being tested.MEM_ADDRESS_REQUIREMENTS) are still watched exactly as before, a placeholder is still never watched, and aMEM_WRITE_WATCHthe title asked for itself is still honoured.can_watch_placement; the switch is read once through aOnceLock, likeVICTORY_WATCH_LARGE_XMEMbeside it.Nothing else changes: the existing fallback for a refused watch, the "XMemVirtualAlloc without write watching" line, and all host-placed watching stay as they were. Series X is unaffected, because its pool is placed by us, on the
constrainedpath.I considered limiting the watch by size instead (the hang is on the 3977 MB pool, the earlier 82 MB placements went through), but the cause is not understood, so a threshold would be a guess about which sizes are safe. Off by default is the conservative choice, and the switch leaves the experiment available.
How it was tested
a_placed_reservation_is_watched_only_when_asked_for: a placed reservation is watched only when the switch asks for it, never through the host-placed path, never for placeholders, and the title's ownMEM_WRITE_WATCHstill passes. It passes.cargo build --release --locked -p victory: finishes, same warnings asmain.cargo clippy -p victory-hle --lib: no finding inxmem.rs(the crate's other warnings are onmain, unchanged).asked_at=0x0), so the title-placed watch path of Series S profile: boot hang in XMemVirtualAlloc since v2026.11.29.01 — caused by 78324212 (write-watch of title-placed reservations), confirmed by revert #3023 was never taken; the evidence for the fix remains the reporter's build with the same effective change (watch off) booting the profile, quoted in Series S profile: boot hang in XMemVirtualAlloc since v2026.11.29.01 — caused by 78324212 (write-watch of title-placed reservations), confirmed by revert #3023. A build from this branch with the switch unset is the missing step; withVICTORY_WATCH_PLACED_XMEM=1the hang should come back, which is the knob for whoever wants to chase the kernel call.cargo test -p victory-hle --lib modules::xmem: 46 passed, 1 failed:a_read_by_range_waits_only_for_a_remapping_that_meets_it, the known parallel-run flake of Tests after the clippy fixes: the asset policy refuses heap_sites/frame_users.rs, three parallel-run flakes, a diag-only compose test #2420 item 2 (PR XMem tests: the range-lock read test runs alone against the tests that copy mappings (9 in 10 runs failed) #2439). It passes when run alone, and it does not touch this path.Checked for overlap
watch_placement: none touches this code. Related: Clippy -D warnings clean across the workspace (main's CI gate) #2048 and Diagnostics-only barrier stats: six needless borrows the all-features gate refuses #3086 (diagnostics build), CI: repair Clippy gate after 11.29.01 combine #2792 (first Clippy gate), XMem tests: the range-lock read test runs alone against the tests that copy mappings (9 in 10 runs failed) #2439 (the xmem flake above); none changesxmem.rs's placement watching.