From dc5b6507889d07003cf01ed1d784c0faf48bec03 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Tue, 6 Oct 2026 15:19:54 -0400 Subject: vgsp: m26 GR launch discriminator - rebuilt window (prelude off), QMD-virt 0x29c, w63 sentinel --- kernel/gsp_phys_gpu.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'kernel/gsp_phys_gpu.c') diff --git a/kernel/gsp_phys_gpu.c b/kernel/gsp_phys_gpu.c index 2f441a0..ad2244e 100644 --- a/kernel/gsp_phys_gpu.c +++ b/kernel/gsp_phys_gpu.c @@ -579,6 +579,42 @@ int gsp_phys_rmcall_gr_promote_value(void) } EXPORT_SYMBOL_GPL(gsp_phys_rmcall_gr_promote_value); +/* + * GR launch verbatim-prelude gate (default 0). 0 = skip the captured + * 136-word verbatim guest prelude and emit the rebuilt inline-QMD window, + * i.e. the proven init(152)+window(67)+PCAS(4)+sem(8) shape; 1 = replay the + * verbatim prelude exactly as before. Read at each launch. + */ +static int gsp_phys_rmcall_gr_prelude_param; +module_param_named(gsp_phys_rmcall_gr_prelude, + gsp_phys_rmcall_gr_prelude_param, int, 0644); +MODULE_PARM_DESC(gsp_phys_rmcall_gr_prelude, + "GR launch verbatim-prelude gate (default 0: skip the captured guest prelude and emit the rebuilt inline-QMD window; 1: replay the verbatim prelude)"); + +int gsp_phys_rmcall_gr_prelude_value(void) +{ + return gsp_phys_rmcall_gr_prelude_param; +} +EXPORT_SYMBOL_GPL(gsp_phys_rmcall_gr_prelude_value); + +/* + * QMD virtualization control gate (default 1). When set, the GR launch block + * emits NVC5C0_SET_QMD_VIRTUALIZATION_CONTROL (0x29c) = IQ2M_ADDR_ENABLE + * (bit 16) | SEND_PCAS_ENABLE (bit 24) after the compute init and before the + * inline-QMD window; 0 omits the method pair. Read at each launch. + */ +static int gsp_phys_rmcall_gr_qmdvirt_param = 1; +module_param_named(gsp_phys_rmcall_gr_qmdvirt, + gsp_phys_rmcall_gr_qmdvirt_param, int, 0644); +MODULE_PARM_DESC(gsp_phys_rmcall_gr_qmdvirt, + "Emit NVC5C0_SET_QMD_VIRTUALIZATION_CONTROL (0x29c = IQ2M_ADDR_ENABLE|SEND_PCAS_ENABLE) in the GR launch block (default 1; 0 omits the method pair)"); + +int gsp_phys_rmcall_gr_qmdvirt_value(void) +{ + return gsp_phys_rmcall_gr_qmdvirt_param; +} +EXPORT_SYMBOL_GPL(gsp_phys_rmcall_gr_qmdvirt_value); + /* * Ladder VAS ownership selector (gsp_phys_rmcall_vas_shared; default 0). * The H1 GR promote wall is a direct consequence of the ladder's -- cgit v1.2.3