The device offers FEATURES_LO bit 26, SHARED_EVENT_NAMES. Ring 0 then carries
three messages only the kext builds: SHARED_EVENT_NAME names a process's shared
event device-wide (answered COMPLETE), SHARED_EVENT_IMPORT makes another
process's new shared event of the name (answered SHARED_EVENT_VALUE, with the
host event's value), and SHARED_EVENT_UNNAME, context 0's, lets go of the name
once no process holds the port the kext gave out for it.
Every holder's id is the one host event, so the processes' command buffers
signal and wait on one GPU timeline, as Metal's do. The values one holder's
buffers signal and its CPU sets go to every other holder as EVENT_SIGNALLED for
its own id, on the completion ring of the queue it named (its listen queue),
each tried at once and kept for a thread of the host's where the ring has no
room, so a process that stops taking its rings holds up no other process.
A name holds the event as a holder does, so an event made of the port after
its maker let go of it works, as the oracle measured (oracle_events refs): the
host event lives as long as the port. A close leaves an event another context
or a name holds as it is, and the last hold's going sets it past every value,
so a closed context's buffer that waits on it still finishes.
For the guest: FEATURES_LO reads bit 26 too, and a driver that takes it may
post the three messages; nothing else changes.