Files
reims-vgpu/guest
Anees Iqbal 29f97fddcf 🐛 Notify pipe transactions only when they carry a cookie
WindowServer drives the display pipe in the transactional model while
kIOWindowServerActiveAttribute carries kIOWSAA_Transactional ('wsrv'
0x80000013 at its start, then 0x11). When its session restarts it hands the
display back to the CPU ('wsrv' 0x2) and submits the shutdown's frames, each
with cookie 0 at +0x100, waiting on each with selector 9 before it exits. The
kext notified every completion. On a macOS 26 guest, WindowServer aborted in
IOAccelerator's _ioAccelDisplayPipeTransactionNotifyCallback about 5 ms after
the kext sent the notification of the first cookie-less transaction, and the
session's next WindowServer started over it.

The cookie is the transaction's own sign that a notification is wanted. The
pipe now notifies a completion only where its transaction carries a cookie;
every transaction still completes for its waiters and for the display. The
bookkeeping moves into RgfxPipeTransactions.hpp, with a native test that
replays the hand-over's order.

Measured on a cold boot of the x86 guest with the same rule keyed to 'wsrv'
instead of the cookie, which notifies the same transactions on every one
measured: 4469 transactions over three hand-overs (a reboot, a logout and a
loginwindow death). All 4461 submitted in the model carried a cookie and were
notified; each hand-over's 4 shutdown frames carried none and were not. Each
WindowServer then exits with exit(0) and no crash report, every wait returns
(26 ms at most), and the next WindowServer enters the model and composites
with Metal.
2026-11-05 21:59:19 -08:00
..