How the command processor reports a finished dispatch, and the two faults that stopped it.
When a kernel finishes, the CP sets the completion signal to 0. Two faults stopped that report.
The Linux kernel accepted both faults. The hardware refused both. This hardware refuses by hanging, and a hang costs a GPU reset.
The first fault is a missing EOP buffer.
The ioctl treats the EOP buffer as optional, "not required for all ASICs". The gfx11 MQD code programs its address and size into the hardware queue descriptor with no zero check.
A queue without an EOP buffer hangs MES on REMOVE_QUEUE when we destroy it. Our fix is a 4 KiB coarse EXECUTABLE buffer, the same buffer libhsakmt allocates.
The second fault is the memory type.
With non-coherent buffers, the kernel runs and the target holds 42. The completion signal stays 1, the queue cannot be removed, and no page fault is logged.
ROCr allocates every buffer the CP touches fine-grained, which is COHERENT. Without COHERENT, the CP's own reads and atomics do not see the bytes the CPU wrote.
We set COHERENT on six buffers:
Coherent memory also changes how a packet starts. The CP polls the write pointer, so a packet runs without a doorbell write.
The kernel accepts many things that the hardware then refuses. Our buffers mirror what ROCr allocates. What the ioctl permits is not enough.
docs/lessons.mddocs/dispatch.mdkfd_mqd_manager_v11.camd_aql_queue.cppfmm.c