XMem: pin short records in tracked CPU mappings #2441

Manually merged
github merged 1 commit from gh-pr/2441/head into gh-pr/2441/base 2026-11-27 00:52:20 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-25 16:56 UTC · original
R0Y00:codex/indirect-dispatch-refresh → main · +75 −14 · 5 files · 1 commits · merged 2026-11-25 17:02 UTC

Refs #1914.

A consumer that records a short command argument can encounter a tracked XMem CPU mapping outside the graphics mirror. Version 2 of the existing in-process section lease API can pin a record within one committed physical page and verify that the same backing still covers it later. The pin keeps the original slot alive across unmapping, grant retirement and reuse of the virtual address. Version 1 retains its mirrored, potentially multi-page contract.

The CPU regression covers a 12-byte record ending at the page boundary, late writes to the original view, same-address replacement, an unleased prefix, crossing the page, holes, mismatched API versions and duplicate release.

Windows 11 build 26200, Release with MSVC x64. The local fixture and regressions passed 10/10 with zero skips, including RTX 4060 Laptop (32.0.16.1656) and WARP.

cmake --build --preset release --target xmem_section_lease_check
ctest --preset release --no-tests=error -j1 -R '^(xmem_section_lease_|xmem_page_batch_inflight_|xmem_shim_mapped_pages$)' --output-on-failure
**@⁠R0Y00** on GitHub · 2026-11-25 16:56 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2441) `R0Y00:codex/indirect-dispatch-refresh` → `main` · +75 −14 · 5 files · 1 commits · merged 2026-11-25 17:02 UTC Refs #1914. A consumer that records a short command argument can encounter a tracked XMem CPU mapping outside the graphics mirror. Version 2 of the existing in-process section lease API can pin a record within one committed physical page and verify that the same backing still covers it later. The pin keeps the original slot alive across unmapping, grant retirement and reuse of the virtual address. Version 1 retains its mirrored, potentially multi-page contract. The CPU regression covers a 12-byte record ending at the page boundary, late writes to the original view, same-address replacement, an unleased prefix, crossing the page, holes, mismatched API versions and duplicate release. Windows 11 build 26200, Release with MSVC x64. The local fixture and regressions passed 10/10 with zero skips, including RTX 4060 Laptop (32.0.16.1656) and WARP. ```powershell cmake --build --preset release --target xmem_section_lease_check ctest --preset release --no-tests=error -j1 -R '^(xmem_section_lease_|xmem_page_batch_inflight_|xmem_shim_mapped_pages$)' --output-on-failure ```
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:52:18 +00:00
github manually merged commit 10acafe6e9 into gh-pr/2441/base 2026-11-27 00:52:20 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.