Repository navigation
xmem: commit physical pages in pieces, and report the real count - #561
JoshRob297 wants to merge 1 commit into
Conversation
…il whole A title that asks for a large block of physical pages fails outright when the host cannot commit all of it at once, which is the 6.5 GB case in Marvisak#23. The console ABI does not promise one contiguous commitment: the request carries a page count, the title compares what it got, and the shim can commit what the host allows in pieces and report the real count instead of failing the whole call. Also names the commit limit at startup, so a machine that cannot hold the reservation says so instead of dying later inside the title.
catminou4
left a comment
There was a problem hiding this comment.
Test-merge with current main (ffe310e) conflicts — needs a rebase. Main moved recently (PR #566 waterfall loops touched lower.rs/resource.rs/valu_tests.rs), so shader PRs opened before it need rebasing. I'll re-review once it merges cleanly.
|
Verification ran against PR head
The failure is at
This verification was AI-assisted. |
|
Automated triage for the maintainers. Needs rebase. This PR does not merge cleanly into current The content has not been reviewed yet; it will be once the branch is rebased onto Generated by Claude Code |
|
Triage verdict — Rebase and verify short allocations ( Evidence
Checks and limits
Next step
This verification was AI-assisted. |
Addresses #23.
A title that asks for a large block of physical pages fails outright when the host cannot commit all of it at once. The console ABI does not promise one contiguous commitment: the request carries a page count, the title compares what it got, and a host can commit what it allows in pieces and report the real count instead of failing the whole call.
What this changes (
crates/victory-hle/src/modules/xmem.rs)Verification
That is a type-check against the target this project pins in
rust-toolchain.toml, not a run: the change is in the physical-page path and has not been exercised against a title.What it does not fix
If the title requires the full reservation contiguously — as opposed to asking for a count and comparing — this does not help, and the way to tell is to log the count the title asks for against the count the host can commit. I have not measured that on the failing machine.
Provenance
The measurement this rests on comes from static analysis of the retail executable's allocation call sites (flag word, 64 KiB unit, and one call site that compares the returned page count), not from the source of this project. No game data is included here: no paths, no container names, no hashes.