summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_phys_gpu.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-15 10:20:13 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-15 10:20:13 -0400
commit48a8089ed3c4892c2577db2da815e6731b882045 (patch)
treedd6907c4213f321ed5637ca65faad62047e9f5b7 /kernel/gsp_phys_gpu.c
parent7e36e2909280414916c821e29e00b341750c8a8f (diff)
downloadopen-iov-48a8089ed3c4892c2577db2da815e6731b882045.tar.gz
open-iov-48a8089ed3c4892c2577db2da815e6731b882045.zip
vgsp-gr: m152 scratch-PT alias cache + extended pool; m153 outcome-verifying launch retry
m152: the Tier-2 shadow alias pool consumed one never-reused 128 B fetch line per mapping per launch (512 lines/boot), so a normal launch mix exhausted it permanently: every later launch that needed a new mapping was refused (the deterministic r152 'launch refused: no Tier-1 mapping' loop). Two fixes: (a) an HPA-keyed alias cache in map_shadow_locked that returns the existing never-rewritten VA for a page already mapped, so repeat launches of the same buffers/sem pages consume nothing; a hit reports line_out = ~0 so contiguity bookkeeping never extends an old line; (b) a 48-window extension pool at VA 0x04000000 (PD0 indices 32..79, one 48-page PT chunk) raising capacity to 2048 lines/boot. m153: the intermittent per-boot mis-execution classes (engine wrote nothing; or wrote into a lower operand window while the output operand stayed untouched - both complete with qmd_rel/ch_rel satisfied, live evidence in r152 smiley: passes wrote b into the a window / nothing / correct-after-10s-retry) are now detected by the m151 retirement wait and retried: refill the bounce window from the guest inputs, re-publish the same method block on a fresh ring entry, re-issue schedule, re-poll, re-wait - bounded by the timeout path's attempt budget. Gate param gsp_phys_rmcall_gr_nowrite_retry (default 1).
Diffstat (limited to 'kernel/gsp_phys_gpu.c')
-rw-r--r--kernel/gsp_phys_gpu.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/kernel/gsp_phys_gpu.c b/kernel/gsp_phys_gpu.c
index c5419a5..9b7235b 100644
--- a/kernel/gsp_phys_gpu.c
+++ b/kernel/gsp_phys_gpu.c
@@ -949,6 +949,31 @@ int gsp_phys_rmcall_gr_skedrec_value(void)
EXPORT_SYMBOL_GPL(gsp_phys_rmcall_gr_skedrec_value);
/*
+ * m153 no-write/wrong-place launch retry (gsp_phys_rmcall_gr_nowrite_retry;
+ * default 1). After a forwarded launch reports completion, the output
+ * retirement wait measures how many resolved data pages the engine actually
+ * changed. Two mis-execution signatures are known to be intermittent per
+ * boot: the engine writes nothing at all, or it writes into a lower operand
+ * window while the highest (output) operand stays untouched (a stale
+ * constant-source state). Both re-execute correctly on a fresh ring entry
+ * often enough to be worth a bounded retry: refill the bounce window from
+ * the guest inputs, re-publish the same method block, re-issue the schedule
+ * and re-poll, then re-wait. Set to 0 to disable the retry and accept the
+ * first outcome unconditionally.
+ */
+static int gsp_phys_rmcall_gr_nowrite_retry_param = 1;
+module_param_named(gsp_phys_rmcall_gr_nowrite_retry,
+ gsp_phys_rmcall_gr_nowrite_retry_param, int, 0644);
+MODULE_PARM_DESC(gsp_phys_rmcall_gr_nowrite_retry,
+ "Re-execute a forwarded GR launch whose retirement wait saw zero/wrong-place engine writes (default 1)");
+
+int gsp_phys_rmcall_gr_nowrite_retry_value(void)
+{
+ return gsp_phys_rmcall_gr_nowrite_retry_param;
+}
+EXPORT_SYMBOL_GPL(gsp_phys_rmcall_gr_nowrite_retry_value);
+
+/*
* m69 window-0 shadow pool (gsp_phys_rmcall_gr_shadow_win0; default 0). When
* set, the forwarded GR launch copies the QMD's program/param pages into the
* window-0 shadow pool (module pages at VAs 0x108000..0x10f000, PTEs planted