summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_phys_gpu.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-24 03:18:54 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-24 03:18:54 -0400
commite7101aae4639909996a826653e0bab089747ffa1 (patch)
treeea5afc5e27875d807d0620be55d5e2c90264dee7 /kernel/gsp_phys_gpu.c
parent99abc7e426ccb3011fa757bacbdfd5a3b91a2e0c (diff)
downloadopen-iov-e7101aae4639909996a826653e0bab089747ffa1.tar.gz
open-iov-e7101aae4639909996a826653e0bab089747ffa1.zip
vgsp-gr r597: emit the captured prelude's SEM_EXECUTE ACQUIRE groups ahead of the rebuilt window (default off)
The verbatim prelude replay breaks the launch (r599: qmd_rel=0 after an 8.9 s stall), so the acquire cannot be taken by replaying the prelude. This takes only the wait method groups - C46F addr 0x5c count>=5 with EXECUTE&7 != 1, and C5C0 SET_REPORT_SEMAPHORE A..D with a non-release op - and copies them verbatim before the proven init+window+PCAS+release block, leaving the window untouched. Gate: gsp_phys_rmcall_gr_acq (default 0). Live A/B on r601: the mail launch's prelude carries ZERO acquire groups (the C5C0 prelude is inline parameter data + release only), so emitted=0 and the VADD race is unchanged - the driver assumes its relocation copies precede the launch without an engine-visible wait.
Diffstat (limited to 'kernel/gsp_phys_gpu.c')
-rw-r--r--kernel/gsp_phys_gpu.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/kernel/gsp_phys_gpu.c b/kernel/gsp_phys_gpu.c
index 74062dd..e9c0c5a 100644
--- a/kernel/gsp_phys_gpu.c
+++ b/kernel/gsp_phys_gpu.c
@@ -617,6 +617,25 @@ int gsp_phys_rmcall_gr_prelude_value(void)
EXPORT_SYMBOL_GPL(gsp_phys_rmcall_gr_prelude_value);
/*
+ * r597: emit the SEM_EXECUTE ACQUIRE groups found in the captured guest
+ * prelude ahead of the rebuilt inline-QMD window (default 0). The verbatim
+ * prelude replay breaks the launch (qmd_rel=0 after an 8.9 s stall, r599),
+ * so the acquire cannot be taken by replaying the prelude; this gate takes
+ * only the wait method groups and leaves the proven window in place.
+ */
+static int gsp_phys_rmcall_gr_acq_param;
+module_param_named(gsp_phys_rmcall_gr_acq, gsp_phys_rmcall_gr_acq_param,
+ int, 0644);
+MODULE_PARM_DESC(gsp_phys_rmcall_gr_acq,
+ "Emit the captured prelude's SEM_EXECUTE ACQUIRE groups ahead of the rebuilt GR window (default 0)");
+
+int gsp_phys_rmcall_gr_acq_value(void)
+{
+ return gsp_phys_rmcall_gr_acq_param;
+}
+EXPORT_SYMBOL_GPL(gsp_phys_rmcall_gr_acq_value);
+
+/*
* QMD virtualization control gate (default 0 after m26 falsified the
* hypothesis: on Turing the context init value is 0, native CUDA never
* writes 0x29c, and the nonzero enable alone does not schedule). When set,