Files
reims-vgpu/docs
Anees Iqbal b2cbf70558 🆕 Map the Shared pool's blocks into the x86-64 kext's processes
The x86-64 kext takes the device's POOL where offered, and sets its own Pool
bit (1 << 15) where it did. A process takes a block through selector 16
(PoolTake): the kext posts its context's POOL_TAKE, maps the block the host
answers with into the process write-back, and lists it. It gives the block
back through selector 17 (PoolGive): the kext unmaps it, then posts the
POOL_GIVE. At the client's close the kext unmaps every block it lists before
the CONTEXT_CLOSE, which gives them all back. HEAP_OVER_POOL joins the
context ring's commands a process submits itself.

The take waits for the host's answer with no deadline, THREAD_UNINT like
the kext's other asks of the host: the host answers each take of an open
context, and the close waits for its takes in flight, so the kext never
gives up on a take whose answer then comes late. Where the host stops
answering, each taking thread waits, holding one of the 32 lifecycle
waiters, until it does.

The arm64e kext takes no POOL and sets no Pool bit: selectors 16 and 17
answer kIOReturnUnsupported there, and its processes keep the region's
blocks and the kext's chunked pages. Selectors 16 and 17 are numbers the
sandbox lets a web content process call.
2026-11-19 00:00:12 -08:00
..