<feed xmlns='http://www.w3.org/2005/Atom'>
<title>npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/runtime/src/value_write_sink.h, branch docs/pso-cache-scope-note</title>
<subtitle>[no description]</subtitle>
<id>https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/atom?h=docs%2Fpso-cache-scope-note</id>
<link rel='self' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/atom?h=docs%2Fpso-cache-scope-note'/>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/'/>
<updated>2026-11-25T11:43:13+00:00</updated>
<entry>
<title>Adapt #622 to #1723: its arena and xmem writes become the list values' fallback</title>
<updated>2026-11-25T11:43:13+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-25T11:43:13+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=924966e2fbde9ae0ac96dcd433803047505efa2f'/>
<id>urn:sha1:924966e2fbde9ae0ac96dcd433803047505efa2f</id>
<content type='text'>
#1723's list values own list slots 71 to 74 of the lists they track and
hand 71/72 to the GPU-label path only for lists they do not track. This
keeps that, and keeps what #622 adds that #1723 lacks: landing a value
in the GPU address arena and on an xmem page the title's view refuses.

- LEONIDA_GPU_LABELS stays opt-in (`1`), as on main and in #1723.
- src/value_write_sink.h: one place for the two targets a host store
  cannot reach, used by both writers. The device answers for the arena
  (an address below its size that is not the title's memory, the rule
  resolve_title_memory uses); xmem registers write_title_bytes for its
  pages. Replaces #622's label-only sink and xmem's title_write_fn.
- The pump's land(): the arena is asked before any host store, so an
  arena offset is never stored to as a host address; then
  kernel_writes::store as before; then xmem's mapping when that store
  faults. Counted as writes_arena and writes_title_pages.
- The arena refuses its reserved start (null region, zero page, quad
  indices) and a write past its end, stores an aligned value in one
  access, and is unregistered when its device goes.
- xmem's write_title_bytes stores an aligned value in one access.
- The label path keeps the same order for untracked lists.

Test, no game data: xbox_list_value_fallback. A tracked list's writes to
title memory land through the host store; to a default-heap buffer's
arena offset land in the arena (read back by a GPU copy); to the arena's
reserved start are dropped; to an xmem page the title made PAGE_NOACCESS
land through xmem's mapping. LEONIDA_GPU_LABELS=1 throughout, and no
write is handed to the label path. Without the arena step it fails at
line 168, without the xmem step at line 208 (llvmpipe and the iGPU).

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
