Skip to content

docs/retail_boot_chain: the xmem rows describe what main serves now, measured on a second GPU - #8196

Open
fiestorra wants to merge 1 commit into
ItsNotRexed:mainfrom
fiestorra:boot-chain-second-machine
Open

fiestorra wants to merge 1 commit into
ItsNotRexed:mainfrom
fiestorra:boot-chain-second-machine

Conversation

@fiestorra

Copy link
Copy Markdown
Contributor

Two things on this page are no longer true about main, and I have a second machine's measurements for them.

Row 2's "no PR changes the check yet" — #6908 landed the change row 2 describes as local (it records the attribute word and drops the PAGE_GRAPHICS_* bits, keeping the CPU protection) and #6919 landed the 2 MiB pages and placeholders. #6843, the PR the row cites for the measurements, is closed without landing.

Row 1 names #6709 and #4531, both still open, as what clears the first XMemVirtualAlloc calls. On plain main that row does not appear as a failure.

Measured here: four --run traces with --trace-d3d12 on main dde82f27e, the RDNA2 iGPU of a desktop 7800X3D (gfx1036, Windows driver 32.0.21045.29003), LEONIDA_D3D12=vulkan, LEONIDA_UNIMPLEMENTED=stop, no local stand-ins and no unmerged pull request. The four package modules the loader maps and the executable map, the four DllMain calls return success, then five xmem_attributes events: 0x21 with 25769803776 bytes, 0x3 with the same size, 0x183 with 1228931072, 0x283 with 2305818624 and 0x181 with 20971520. Nothing in the traces reports an import refused while binding, and the run continues past all five requests. What it stops on has the shape of row 4.

I kept the RTX 4090 measurements as they are and added mine as a second Setup block, §1.1, with the limits of my runs written next to them rather than hidden:

  • xmem_attributes carries the api name, the attribute word, the size and the caller, and not the allocationType argument, so the two 64 KiB reserve forms of row 1 cannot be told apart from a trace today. Trace failed XMem virtual allocations while preserving last error #6733 records refusals and Show XMem physical page requests in boot_trace #8008 records physical page requests; neither is in these runs.
  • Row 3 is not tested by these runs at all: xgameruntime.dll is not mapped, the shims serve it, so there is no xgameruntime.lib thunk in which a missing XErrorReport could be fatal. One run's log does report the title asking for that export through GetProcAddress and continuing past it.
  • An exception event is not always the title's: these runs hold an access violation inside the host's GameInput.dll reading 0x10, a fraction of a millisecond before the title's fault, with host frames only in its stack.

Before measuring I checked that between the build these traces come from and this main the only files that change under runtime/ are shims/d3d12_com.cpp, shims/d3d12_vulkan_device.cpp and two tests, so the xmem.cpp and loader in the traces are the ones on main.

Tests: py -3.13 -I -m unittest discover -s tests -p "test_docs_*.py" gives 37 tests and the same 2 failures as origin/main (the docs/dev-tools.md anchor and the missing gpu-test-results/RX9070GRE.txt). Neither is in this page, and the failures are identical with my change stashed.

Claimed in #7231 (issuecomment-7109728815). No open pull request touches this file. If an RT-5 owner would rather fold this into their own update, say so and I release it.

Row 2 said no pull request had changed the attribute-word check. ItsNotRexed#6908 landed it, recording the word and dropping
the PAGE_GRAPHICS_* bits, and ItsNotRexed#6919 landed the 2 MiB pages and placeholders, so rows 1 and 2 no longer describe
what stops a run: ItsNotRexed#6709 and ItsNotRexed#4531, the two the rows name, are both still open, and a run uses the merged code.

Measured here: four `--run` traces with `--trace-d3d12` on `main` dde82f2, RDNA2 iGPU (gfx1036, Windows driver
32.0.21045.29003), no local stand-ins and no unmerged pull request. All five startup XMemVirtualAlloc requests
are recorded (0x21 and 0x3 at 25769803776 bytes, 0x183 at 1228931072, 0x283 at 2305818624, 0x181 at 20971520)
and the run continues past them; the first failure has the shape of row 4. Added as a second Setup block (§1.1)
rather than rewriting the RTX 4090 measurements, with what these traces cannot say written next to them: the
xmem_attributes event does not carry allocationType, so the two 64 KiB reserve forms of row 1 cannot be told
apart from a trace, and row 3 is not reached here because xgameruntime.dll is served by the shims instead of
mapped. The last paragraph is about reading a trace: one access violation in these runs is inside the host's
GameInput.dll with host frames only in its stack, so an exception event is the title's only when its stack holds
frames of the mapped title.

Checked with `py -3.13 -I -m unittest discover -s tests -p "test_docs_*.py"`: 37 tests, the same 2 failures as
origin/main (the `docs/dev-tools.md` anchor and the missing `gpu-test-results/RX9070GRE.txt`), neither in this
page. Confirmed before measuring that between the build these traces come from and this main the only files that
change under runtime/ are shims/d3d12_com.cpp, shims/d3d12_vulkan_device.cpp and two tests.

Coordinated in ItsNotRexed#7231: claiming at issuecomment-7109728815, with the measurements and the offer to hand the page
to an RT-5 owner if one wants it.
@morodirule

Copy link
Copy Markdown

Tested 3df75ef on Arch Linux, Python 3.14.10, CPU only: pass — first Linux check. Docs-only change; static check confirms runtime/shims/xgameruntime.cpp serves XErrorReport as the doc claims. Docs tests: the only 2 failures are the known pre-existing links (dev-tools anchor, gpu-results file), both on files this PR doesn't touch. No game files. AI-assisted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants