Repository navigation
HLE/dstorage: a plain read the kernel refuses into guarded title memo… - #552
pug205gti6 wants to merge 1 commit into
Conversation
…ry is copied through a buffer A plain DirectStorage read (options 0, file source, address destination) lands through ReadFile into title memory. `kernel_will_write` opens the write guard's blocks first, but the GPU side's check can make a block read-only again before the read lands; ReadFile then fails with ERROR_INVALID_USER_BUFFER (0x800706f8), the request fails, and the title stops on its own breakpoint shortly after (int3 at +0x23d8f03 here: an allocator result checked for null). On those two errors (and ERROR_NOACCESS), when the destination is committed and accessible, read into our own buffer and store the bytes with plain writes, which fault into the guard's handler like the title's own. Anything else keeps the kernel's error. RTX 3070 Ti 8 GB, Ryzen 5 5600X, Windows 11, Series X profile: three cold starts (fresh shader cache) in a row ended on that breakpoint, each right after "dstorage: request failed: copying ... hr=0x800706f8"; with this change three runs on new builds (shaders translated afresh) reached the world; the fallback copied one refused read in two of them, the third had none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent verification: PR #552 merges cleanly onto main, 68 lines added to crates/victory-hle/src/modules/dstorage.rs. Build: success (7.97s). Tests: fail to compile on Linux due to pre-existing windows_sys issues in victory-loader and victory-gpu — confirmed on unmodified main. Addresses DirectStorage guarded memory read failure. Machine: Arch Linux, kernel 7.3.5-arch1-1, 3x RTX 4090 driver 620.73.04, Proton, AI-assisted. |
|
Duplicate of #426: @YeokiNoewChi opened this patch 87 minutes earlier, and Both PRs are CONFLICTING, so this copy does not resolve the conflict it was probably made for. Please continue in #426 so the review history and any test data stay in one place. |
…torage: a plain read the kernel refuses into guarded title memo… Upstream pull request 552, applied unchanged on c96b4f2 for this integration branch. All credit to its author. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry is copied through a buffer
A plain DirectStorage read (options 0, file source, address destination) lands through ReadFile into title memory.
kernel_will_writeopens the write guard's blocks first, but the GPU side's check can make a block read-only again before the read lands; ReadFile then fails with ERROR_INVALID_USER_BUFFER (0x800706f8), the request fails, and the title stops on its own breakpoint shortly after (int3 at +0x23d8f03 here: an allocator result checked for null).On those two errors (and ERROR_NOACCESS), when the destination is committed and accessible, read into our own buffer and store the bytes with plain writes, which fault into the guard's handler like the title's own. Anything else keeps the kernel's error.
RTX 3070 Ti 8 GB, Ryzen 5 5600X, Windows 11, Series X profile: three cold starts (fresh shader cache) in a row ended on that breakpoint, each right after "dstorage: request failed: copying ... hr=0x800706f8"; with this change three runs on new builds (shaders translated afresh) reached the world; the fallback copied one refused read in two of them, the third had none.