summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_rm_emulation.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/gsp_rm_emulation.c')
-rw-r--r--kernel/gsp_rm_emulation.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/kernel/gsp_rm_emulation.c b/kernel/gsp_rm_emulation.c
index 2d38829..44e716b 100644
--- a/kernel/gsp_rm_emulation.c
+++ b/kernel/gsp_rm_emulation.c
@@ -1530,16 +1530,17 @@ static void gsp_rm_poll_commands(struct gsp_emu_context *ctx)
if (signature != GSPRM_RPC_SIGNATURE || elem_count == 0 ||
elem_count > rm->cmd_msgcount) {
- /* The driver always writes a valid element BEFORE
- * bumping writePtr. Garbage content means the queue
- * buffer is stale (freed and reused by the guest
- * after unload/crash) - declare the emulated GSP
- * dead so the next probe re-boots. */
- nv_vgpu_warn(ctx->vgpu, "GSPRM: garbage element idx=%u sig=0x%x elemCount=%u fn=%u, GSP boot declared dead",
+ /* Garbage element: could be teardown (driver stopped
+ * writing valid elements after UNLOADING_GUEST_DRIVER/
+ * FREE sequence) or genuine queue death. Don't declare
+ * death here - stop polling quietly and let the
+ * Booter-unload kick (SEC2 CPUCTL) trigger the reset
+ * via gsp_emu_clear_boot_state. This allows the
+ * driver's cleanup frees to complete. */
+ nv_vgpu_info(ctx->vgpu, "GSPRM: garbage element idx=%u sig=0x%x elemCount=%u fn=%u, stopping poll (teardown?)",
rm->cmd_read, signature, elem_count,
hdr->function);
kfree(elem);
- gsp_emu_clear_boot_state(ctx, "garbage GSP-RM queue");
return;
}