summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_sema_service.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-29 15:41:01 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-29 15:41:01 -0400
commit5757095befda5982e90b3a3af78b57c339e9ab53 (patch)
tree0ca0061e029e87564e42692e482b0e54c0dc4813 /kernel/gsp_sema_service.c
parentb7636afd9715748396325ec4dd0899c7f42ece17 (diff)
downloadopen-iov-5757095befda5982e90b3a3af78b57c339e9ab53.tar.gz
open-iov-5757095befda5982e90b3a3af78b57c339e9ab53.zip
sema-svc: sema_skip_ops parameter (apply releases without running pushed memsets)
Diffstat (limited to 'kernel/gsp_sema_service.c')
-rw-r--r--kernel/gsp_sema_service.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index 0c0e85b..e21c997 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -2258,7 +2258,7 @@ static void svc_decode_stream(struct nv_vgpu_device *vgpu, const u8 *buf,
svc_rel_va_seen = va;
/* The push's work always runs; see the
* REPORT_SEM comment below. */
- if (allow_ops && n_ops) {
+ if (allow_ops && n_ops && !gsp_sema_skip_ops) {
svc_run_ops(vgpu, ops, n_ops);
svc.ring_ops++;
ops_runs++;
@@ -2341,11 +2341,11 @@ static void svc_decode_stream(struct nv_vgpu_device *vgpu, const u8 *buf,
* through a trusted ring translation, so this
* cannot run swept-RAM false positives.
*/
- if (allow_ops && n_ops) {
- svc_run_ops(vgpu, ops, n_ops);
- svc.ring_ops++;
- ops_runs++;
- }
+ if (allow_ops && n_ops && !gsp_sema_skip_ops) {
+ svc_run_ops(vgpu, ops, n_ops);
+ svc.ring_ops++;
+ ops_runs++;
+ }
n_ops = 0;
if (svc_sem_read(vgpu, va, &cur))
break;
@@ -2542,7 +2542,7 @@ static void svc_decode_stream(struct nv_vgpu_device *vgpu, const u8 *buf,
* Ops are only ever collected from pushes read
* through a trusted ring translation.
*/
- if (allow_ops && n_ops) {
+ if (allow_ops && n_ops && !gsp_sema_skip_ops) {
svc_run_ops(vgpu, ops, n_ops);
svc.ring_ops++;
ops_runs++;
@@ -3362,6 +3362,18 @@ unsigned gsp_sema_gr_grace_ms = 8000;
*/
bool gsp_sema_fake_rel;
+/*
+ * Skip executing a push's collected work (CE memsets/copies into the vidmem
+ * shadow) while still applying its semaphore release. The client only ever
+ * observes the release; the shadow writes exist so the emulation can walk
+ * page tables it built, and the critical translations are injected from guest
+ * truth instead. Running thousands of memsets per context creation is what
+ * pushes the client past its context-init deadline; skipping them trades
+ * emulation-internal fidelity for the latency the client deadline requires.
+ * Off by default; enabled per run through the module parameter.
+ */
+bool gsp_sema_skip_ops;
+
static unsigned long svc_gr_ring_tried; /* ranks that got a diagnostic line */
static void svc_gr_ring_autopin(struct nv_vgpu_device *vgpu,