Files
reims-vgpu/docs
Anees Iqbal 0b41f2472a 🐛 Send each pipe client the completion word count its release reads
WindowServer's display pipe callback asserts that a transaction's completion
has exactly the word count its IOAccelerator expects, and aborts on any
other. The kext always sent 11, the count from macOS 13 on, so WindowServer
aborted at its first completion on macOS 11 and 12. Booting the kext with
each count measured them: 8 on 11.7.11, 9 on 12.7.6, 11 on 13.7.8 and later.

The count follows what the client and the system show, never the release:
- macOS 11's WindowServer submits 0x108-byte transactions, the 0x118 layout
  without its last 16 bytes (zeros on 12 and 26). Selector 8 now takes either
  size, reads a short one as 0x118 with zeros past its end, and a client
  whose first transaction is 0x108 bytes gets 8 words.
- A client of 0x118-byte transactions gets 11 where IOAcceleratorFamily2
  exports IOAccelMemoryMap::getAssignedGPUVirtualAddressLength() const
  (13.7.8 to 26.7.2's kernel collections do; 11.7.10 to 12.7.6's do not),
  else 9. ReimsGraphics names the family in OSBundleLibraries and its Graft
  declaration (anchored by IOAccelMemoryMap, a class every release from 11
  to 26 defines there), references the symbol weakly without calling it, and
  reads at start whether its binder resolved it (OSKextSymbolIsResolved, or
  a null address).

What changes for the guest: on macOS 11 and 12 WindowServer's transactions
complete instead of aborting it; from macOS 13 on the completions are
unchanged.
2026-11-08 05:15:44 -08:00
..