From d2848c109761e3ccde81a742f4569730254031f8 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Wed, 7 Oct 2026 15:05:08 -0400 Subject: vgsp: m106 - pre-install the data PT window pool in stage 3 (pre-commit) Post-commit UPDATE_PDE_2 installs are accepted (status 0x0) but ineffective (m94's scratch windows, m101-m105's reloc windows: the SM never resolves them), while the stage-3 ctx-window installs are honoured. Add a fixed 32-window pool at GSP_PHYS_RMCALL_VA_GR_DATA_BASE (0x100000000 + k<<21, inside the server-managed region), each backed by a module PT page installed through UPDATE_PDE_2 during stage 3; the engine data map then only writes leaf PTEs into those fresh PT pages at launch (the P6b-proven 'direct leaf write into a walker-installed fresh table' pattern). The mail injection uses the reserved last window (k=31); service data windows cap at 31 and use the same fixed layout. --- kernel/gsp_phys_gpu.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'kernel/gsp_phys_gpu.c') diff --git a/kernel/gsp_phys_gpu.c b/kernel/gsp_phys_gpu.c index a350ed9..e92e5f1 100644 --- a/kernel/gsp_phys_gpu.c +++ b/kernel/gsp_phys_gpu.c @@ -1029,6 +1029,26 @@ int gsp_phys_rmcall_gr_mail_patch_value(void) } EXPORT_SYMBOL_GPL(gsp_phys_rmcall_gr_mail_patch_value); +/* + * m106: pre-install the fixed data PT pool (32 windows at + * GSP_PHYS_RMCALL_VA_GR_DATA_BASE) during stage 3, before the channel + * commit. Post-commit UPDATE_PDE_2 installs are accepted but ineffective + * (m101-m105); the ctx-window installs show the pre-commit path is the + * one the engine honours. Launch-time work is then only leaf PTE writes + * into these freshly installed PT pages. Default 0. + */ +static int gsp_phys_rmcall_gr_data_prewin_param; +module_param_named(gsp_phys_rmcall_gr_data_prewin, + gsp_phys_rmcall_gr_data_prewin_param, int, 0644); +MODULE_PARM_DESC(gsp_phys_rmcall_gr_data_prewin, + "Pre-install the data PT window pool in stage 3 (default 0)"); + +int gsp_phys_rmcall_gr_data_prewin_value(void) +{ + return gsp_phys_rmcall_gr_data_prewin_param; +} +EXPORT_SYMBOL_GPL(gsp_phys_rmcall_gr_data_prewin_value); + /* * m95: program each GPC's MMU_CTRL from the hub's PFB MMU_CTRL (the real RM's * grInitGPCMmuPRIRegs matching-fields copy) before a forwarded launch. The -- cgit v1.2.3