summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_emulation.h
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_emulation.h
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_emulation.h')
-rw-r--r--kernel/gsp_emulation.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/gsp_emulation.h b/kernel/gsp_emulation.h
index 6fa69b1..801ea78 100644
--- a/kernel/gsp_emulation.h
+++ b/kernel/gsp_emulation.h
@@ -129,6 +129,11 @@ struct gsp_emu_context {
/* GSP-RM msgq emulation (physical path, guest-sysmem queues) */
struct gsp_rm_emu *rm_emu;
+
+ /* PRAMIN window translation state (BAR0 window -> emulated vidmem) */
+ u32 bar0_window_base; /* last-seen NV_PBUS_BAR0_WINDOW BASE (page) */
+ u32 bar0_window_target; /* last-seen TARGET (0=vidmem, 2/3=sysmem) */
+ bool bar0_window_valid; /* base/target captured at least once */
};
/* Shadow accessors shared with gsp_rm_emulation.c */