A device reset left every paravirtual VideoToolbox session running. The
reset contract (reims-vgpu-graphics device.rs) says device_reset drops what
the host keeps for the guest's processes, and that the settle returns only
once nothing begun before the reset can write the guest's memory. Neither
held for these sessions. The guest's kext lets go of every lend at its stop,
but a session open at a panic or a hard reset kept its thread, its hardware
decoder, its kept views and its lent surfaces. A decode in flight at the
reset could still write a picture into the lent surface's pages after the
reset returned, and the rebooted guest may already be using those pages.
Both device_reset and the settle now end every session, as -all does
(paravirt::Host::end_sessions). A closed session sends nothing more, and its
requests end at once. Its thread carries out no message past the one in
hand and gives back what each message lent. The settle waits, within the
reset's 30 s bound on the platform's clock, for each closed session's thread
to end, so the reset returns only once no session can write. A session still
holding a message past the bound ends the process, as GPU work past the
bound does: a write a hardware decoder or GPU copy has begun cannot be taken
back.
What the guest sees: nothing of the boot before writes its memory after the
reset returns, and a message for an old session's UUID is answered as one
with no session.