Files
reims-vgpu/docs
Anees Iqbal a75f372539 🆕 Place Private objects in the Private blocks the host gives
This change is visible to the guest. Where the kext and the device both took
PRIVATE_BLOCKS, these objects now get their gpuAddress inside blocks the
host gives the context, rather than in the context's own range in
[2^46, 2^47):
- Private buffers;
- heaps that are not Shared, and the buffers in them;
- Managed buffers, whose GPU copies are what the address names.

On the Vulkan platform those addresses lie in [2^44, 2^45). On
metal2vulkan-rt's device they are the Vulkan device addresses of the host's
memory, which is the reason for the move. Shared buffers, the pool's heaps
and no-copy buffers keep their addresses.

How the bundle picks inside its blocks:
- Picks are next fit through the blocks, on the same span and granule
  rules as the context's range.
- A block is taken from the kext when none has room: 256 MiB, or the pick's
  span and alignment rounded up to 64 KiB where that is more. 256 MiB is
  rt's pooled block, and it keeps a freed span from being picked again soon
  after its destroy.
- Free ranges never join across blocks, so no pick spans two of them.
- One empty block is kept for the next picks. Any further empty block is
  given back after the last object's destroy has been posted.
- Where the host refuses a take, the bundle picks in the context's range as
  before and logs the first refusal.

The serializer tests cover picks in blocks, a block of its own for a large
pick, giving back and keeping, blocks side by side, refusal and threads.
docs/graphics-kext/design.md gains "Private blocks" and the two selectors.
2026-11-19 02:30:57 -08:00
..