summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_rm_emulation.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-22 10:59:59 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-22 10:59:59 -0400
commita7bda851fc7938555eaaf69b062f49efb9d90ece (patch)
treec5b59bff979e7ba7b3442d0a2e3aed478b9b416f /kernel/gsp_rm_emulation.c
parent8f01fb29256aa1a8ab3088015916425ff910e0b0 (diff)
downloadopen-iov-a7bda851fc7938555eaaf69b062f49efb9d90ece.tar.gz
open-iov-a7bda851fc7938555eaaf69b062f49efb9d90ece.zip
PRAMIN window translation + queue state preservation on Booter-unload
Fixes the BAR2 verify test failure (kbusVerifyBar2_GM107): - GSP emulation thread now watches NV_PBUS_BAR0_WINDOW (BAR0+0x1700) for base/target changes and syncs the PRAMIN window (BAR0+0x700000) from the emulated BAR1 (vidmem) at (base << 16). This makes PRAMIN reads return correct vidmem content for the BAR2 verify test. Fixes the fn-10 FREE timeout during driver cleanup: - gsp_emu_clear_boot_state no longer resets the GSP-RM queue state on Booter-unload kick. The driver sends cleanup FREEs AFTER the Booter-unload kick; resetting the queue here caused those frees to time out. - Queue state is now only reset on: ENGINE reset (full GPU reset) or genuine queue death (insane writePtr). Both call gsp_rm_emu_reset explicitly. Also fixes rmq tool ioctl encoding: - Use _IOWR('F', nr, type) encoding for NVIDIA ioctls (was raw numbers) - Open /dev/nvidiactl (not /dev/nvidia0) for RM_ALLOC - Add NVOS64_PARAMETERS (48 bytes) for device/subdevice allocs Verified: BAR2 verify test passes, INSTLOC regkey read, driver probes past RmInitNvDevice bus init, reaches fn-10 FREE timeout during cleanup (same as handoff's characterized blocker).
Diffstat (limited to 'kernel/gsp_rm_emulation.c')
-rw-r--r--kernel/gsp_rm_emulation.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/gsp_rm_emulation.c b/kernel/gsp_rm_emulation.c
index 44e716b..07ba807 100644
--- a/kernel/gsp_rm_emulation.c
+++ b/kernel/gsp_rm_emulation.c
@@ -1504,6 +1504,7 @@ static void gsp_rm_poll_commands(struct gsp_emu_context *ctx)
nv_vgpu_warn(ctx->vgpu, "GSPRM: insane cmd writePtr %u (msgCount=%u), GSP boot declared dead",
tx.writePtr, rm->cmd_msgcount);
gsp_emu_clear_boot_state(ctx, "stale GSP-RM queue header");
+ gsp_rm_emu_reset(ctx);
return;
}