Files
reims-vgpu/docs/graphics-kext
Anees Iqbal 860570b8d1 🐛 Keep a Managed buffer made off its copy's address, not refuse it
Where the guest took MANAGED_AT_COPY and the platform makes the Managed
buffer at an address other than its CPU copy's (a copy in no block the
platform knows, such as one over the region), the host refused the
create, so the guest's id stood for a refused object: nil where bound,
its uses dropped. Metal makes that buffer, so the host must not refuse
it.

The host now keeps the buffer the platform made. It is the buffer the
same create makes from a guest that did not take the bit: the same
platform call, the same pin left unkept and counted, the same binding.
Each such create is counted as managed-at-copy-unkept, the first logged.

What changes for the guest on a unified rt host: such a create is a live
buffer, bound and used as without the bit, rather than a refused object.
Its gpuAddress is the address the guest posted, which the buffer is not
at, as a guest's own pick is not on that host today. Nothing changes
where the copy lies in a block the platform knows, nor on a host that
does not offer the bit.

The wire header's doc for the bit says so. The prebuilt sets and the
option ROM's record are rebuilt from it in their own commit.

The tests compare the answers with the same create's without the bit:
the decoder test its result, the platform's calls, the binding, the GPU
address, the unkept pin's count, a didModifyRange and a synchronize; the
rt GPU test its result, the binding and rt's address over the region.
2026-11-19 15:43:47 -08:00
..