Files
reims-vgpu/docs/graphics-kext
Anees Iqbal 0ed439f58c 🐛 Keep the accelerator's region and registers until it is freed
A CPU lock of an IOSurface in any process (the surfaces' control function,
RgfxAcceleratorLocks.cpp) and the release worker reach the accelerator with
no client of their own, and write a block's runs through its region
(writeRuns), which can come after the accelerator's stop. The stop's
teardown released the region and the registers' mapping, so such a write
would reach a released mapping, a kernel panic.

No path in the lab was shown to run this stop while such a write is due:
kmutil refuses to unload the kext from the boot kernel collection, QEMU
refuses device_del, and a restart was not shown to reach stop(). The hole is
in the teardown the tree ships, so it is closed now rather than once a guest
meets it.

The region and the registers' mapping now go at free(), and a failed start
leaves them to it too. Nothing changes for a guest: boots, a restart and a
shutdown, on the fixes' own kext set (potluck job m3-max-80704), are
unchanged.
2026-12-02 20:01:57 -08:00
..