summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-11-04 12:01:38 -0500
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-11-04 12:01:38 -0500
commitbbda751e9e10034a854e25e5f62955cfa283bb5d (patch)
tree3b3125e23cd8b023687da22dd6822b2db561a26a /kernel
parent79545530c4b54202b69b01b13f28a9ca874e88db (diff)
downloadopen-iov-bbda751e9e10034a854e25e5f62955cfa283bb5d.tar.gz
open-iov-bbda751e9e10034a854e25e5f62955cfa283bb5d.zip
vgsp-gr: sema_gl_attr_sph_drop (default 1) - drop the attr-prelude SET_PIPELINE(2) runs (method 0x2080; the guest's cold 0x20 word is refused EC4 by the FE on a windowless LOAD-ONLY carrier); exact mask (op in {1,3,5}, cnt!=0, (hdr&0xfff)<<2==0x2080), once-per-gen log + counter, 0=legacy; SPH-BIND log caps 16->64
Diffstat (limited to 'kernel')
-rw-r--r--kernel/gsp_phys_booter.c52
1 files changed, 50 insertions, 2 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c
index 8ad3e64..67642c8 100644
--- a/kernel/gsp_phys_booter.c
+++ b/kernel/gsp_phys_booter.c
@@ -19477,6 +19477,28 @@ MODULE_PARM_DESC(sema_gl_attr_prelude,
"Preplay the captured client attr/pipeline runs (0x1100..0x11fc, 0x2000..0x205c, relocation applied) ahead of the first 3D window replays of a capture generation (default 1)");
/*
+ * CONT-120 (r1451): drop the attr-prelude's SET_PIPELINE_SHADER(2) runs
+ * (run header method field encoding method 0x2080) from the attr copy.
+ * The r1450c wall #8 proved the writer of `Offset 0x2080 Data 0x20
+ * ErrorCode 4` is the guest's own captured one-shot attr emission
+ * (`20010820 00000020` = SET_PIPELINE_SHADER(2) <- 0x20, a cold disable
+ * word) replayed on a windowless LOAD-ONLY carrier: with no SPH-BIND
+ * stage-2 enable ahead of it the FE refuses the write contextually. The
+ * same word rides window-bearing launches clean because our SPH-BIND
+ * block (0x2080 <- 0x21) is prepended. This knob drops only those runs
+ * (ops 1/3/5, cnt != 0, method == 0x2080), cursor advancing exactly like
+ * the SDM drop (no raw fallback, dropped for the generation). Default 1;
+ * A/B with 0 = legacy byte-for-byte.
+ */
+static bool gsp_phys_rmcall_gr_attr_sph_drop = true;
+module_param_named(sema_gl_attr_sph_drop, gsp_phys_rmcall_gr_attr_sph_drop,
+ bool, 0644);
+MODULE_PARM_DESC(sema_gl_attr_sph_drop,
+ "Drop the attr-prelude SET_PIPELINE_SHADER(2) runs (method 0x2080, the guest's cold 0x20 disable word) the FE refuses with EC4 on a windowless LOAD-ONLY carrier (default 1; 0 = legacy)");
+static u32 gsp_phys_gr_attr_sph_drop_count; /* runs dropped (all gens) */
+static u32 gsp_phys_gr_attr_sph_drop_gen; /* gen of the last drop log */
+
+/*
* The patched (relocation-applied) attr prelude for the current capture
* generation, built by the submit path just before build_gr_launch. Single
* caller (the ordered single-inflight sema work item), so plain statics.
@@ -21399,6 +21421,32 @@ if (gsp_phys_gr_slot_kept(j, sa_mask,
off += span;
continue;
}
+ /*
+ * CONT-120 (r1451): drop the attr-prelude
+ * SET_PIPELINE_SHADER(2) run(s) - the guest's
+ * cold `0x2080 <- 0x20` word is refused by the
+ * FE with Class Error EC4 when its one-shot
+ * attr emission rides a windowless LOAD-ONLY
+ * carrier (no SPH-BIND enable ahead of it; see
+ * sema_gl_attr_sph_drop). Cursor advances like
+ * the SDM drop: no raw fallback.
+ */
+ if (READ_ONCE(gsp_phys_rmcall_gr_attr_sph_drop) &&
+ (op == 1u || op == 3u || op == 5u) && cnt &&
+ ((hdr & 0xfffu) << 2) == 0x2080u) {
+ gsp_phys_gr_attr_sph_drop_count++;
+ if (gsp_phys_gr_attr_sph_drop_gen !=
+ READ_ONCE(gsp_phys_gr_attr_pre_gen)) {
+ gsp_phys_gr_attr_sph_drop_gen =
+ READ_ONCE(gsp_phys_gr_attr_pre_gen);
+ pr_info("vgsp-gr: ATTR-PRELUDE dropped SET_PIPELINE gen=%u mthd=0x%x drops=%u\n",
+ gsp_phys_gr_attr_sph_drop_gen,
+ (u32)((hdr & 0xfffu) << 2),
+ gsp_phys_gr_attr_sph_drop_count);
+ }
+ off += span;
+ continue;
+ }
if (copied + span > avail)
break;
memcpy(&p[copied], &attr_pre[off],
@@ -28039,7 +28087,7 @@ gr_page_unmapped:
(size_t)win3d_n * 4u);
memcpy(stream_patch, out, (size_t)nfin * 4u);
win3d_n += nfin;
- if (sph_bind_log < 16u) {
+ if (sph_bind_log < 64u) {
sph_bind_log++;
pr_info("vgsp-gr: SPH-BIND emitted fam=0x%llx win-binds=%u j2=0x%llx j5=0x%llx j1-type=0x11 rc=0x1a initblk=17 win=%u (pre=%u) h=0x%x push=0x%llx\n",
fam, req->n_prog_binds,
@@ -28048,7 +28096,7 @@ gr_page_unmapped:
req->h_object,
req->push_va);
}
- } else if (sph_bind_log < 16u) {
+ } else if (sph_bind_log < 64u) {
sph_bind_log++;
pr_info("vgsp-gr: SPH-BIND skipped (reloc=%u/%u kept=%u/%u fam=0x%llx h=0x%x push=0x%llx)\n",
orel, nrun, on, nfin, fam,