mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:50:52 +01:00
[PR #969] [CLOSED] dstorage: requests into physical pages write the title's pages (RT-DSTORAGE-DEST-PAGES) #1007
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1007
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/969
Author: @DadaCap
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:dstorage-dest-pages📝 Commits (1)
e56789adstorage: requests into physical pages write the title's pages (RT-DSTORAGE-DEST-PAGES)📊 Changes
6 files changed (+155 additions, -7 deletions)
View changed files
📝
docs/directstorage.md(+14 -3)📝
runtime/shims/dstorage.cpp(+34 -3)📝
runtime/shims/xmem.cpp(+28 -0)📝
runtime/shims/xmem.h(+8 -0)📝
runtime/test/dstorage_test.cpp(+60 -1)📝
runtime/test/xmem_test.cpp(+11 -0)📄 Description
Claim: RT-DSTORAGE-DEST-PAGES (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7136979744).
A DirectStorage request with
DestinationIsPhysicalPagesruns into a staging buffer and its bytes then go to the 64 KiB pagesXMemAllocatePhysicalPagesgave out (rt::xmem::write_physical_pages), so every address they are mapped at sees them. Until now it answeredE_NOTIMPL.The page array is read when the request runs, not at enqueue. The retail title passes a pointer into its own page table: at enqueue the entries are 0, and they are filled by the time the request runs. Measured on 1.0.2.1 (in my prototype stack): with a copy taken at enqueue nearly every such request named page 0; read late, no request failed in a 240 s run that reaches the loading screen.
The xmem shim is called through a pointer, as
dstorage_testdoes not link it; without it such a request staysE_NOTIMPL. Physical-page sources stayE_NOTIMPL(none has been seen).Tested
dstorage_test: 341 checks, 0 failures (new: the table filled after enqueue, the offset, three pages, a page that is not live, a null and an unreadable array).xmem_test: 220 checks OK (new: writes across pages, into uncommitted ones, bad page numbers). Windows 11, MSVC, Release-with-debug-info, onmain.AI-assisted (Claude Code, Opus 5.5).
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.