The codebase called the guest's object-list tags `type-4`, `type-5`, `type-11`
and `TYPE7` in about 1400 places, which is what you write while the contract is
still being recovered. It is recovered, so this names them.
Static RE settles it. The tag is Apple's `APVObjectType`, from the mangled
symbol of the one writer, `AppleParavirtResourceHeap::addObject(APVObjectType,
unsigned int, unsigned int, void const*)`. Every constant reaching that call
was read out of the guest's own driver — extracted from the provisioned
13.6 image this project boots — and cross-checked against the tag the device
side dispatches on in `PGResourceManager::createObject`, on both 13.6 and the
current host. So: 1 buffer, 2 and 3 texture, 4 backing, 5 ref texture,
6 function, 7 serializer object, 8 texture view, 11 mapper-ref texture.
Two findings the names now carry:
The rails use disjoint halves of one tag space, because the guests load
different drivers — an x86 guest `AppleParavirtGPU`, an arm64 guest
`AppleParavirtGPUIOGPUFamily`. That is why 4 and 5 never appear on arm and 11
never on x86, and why neither absence is a decode gap. The old comments called
this "the x86 type-4 present path" without saying why it was x86's.
Tag 3 is not a "variant" of 2. Both are one `APVObjectTexture` landing on
`PGSinglePlaneTextureResource`; the host sets that resource's
`_generateMipmaps` exactly when the tag is 3, and then reads one 36-byte level
record instead of the count the descriptor's leading 14-bit field states. A 3
is a texture whose base level the guest describes and whose chain the host
generates — identical in Ventura and on the current host.
`OBJECT_TYPE_TEXTURE_VARIANT` becomes `OBJECT_TYPE_TEXTURE_GENERATE_MIPMAPS`,
`OBJECT_TYPE_TYPE7` becomes `OBJECT_TYPE_SERIALIZER_OBJECT`, and the tag table
plus its provenance lands in the owner, `runtime::decode::resource`. The
serializer-object subtypes get the same treatment: the host requires tag 7 and
then dispatches on the descriptor's first dword, which confirms the sampler,
depth-stencil and pipeline values this crate already had and names the two it
has no reader for.
Identifiers, observability slugs, doc comments and test names all move
together; slugs renamed here are renamed in the probe scripts that grep them.
Pure rename: no decode, no dispatch and no wire constant changed.
Verified: fmt, clippy and `cargo doc` clean of new findings on the workspace;
1333 lib tests, and the full `--all-targets` suite serially on both the default
Metal rail and `backend-vulkan` (2181 + integration, 0 failed); the
`backend-metal,backend-vulkan` both-rails configuration still checks. No VM or
conformance run: nothing here can change guest-visible behaviour.
Claude-Session: https://claude.ai/code/session_01HsCsfsNbdFAS11TaiPpkik