summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_sema_service.c
diff options
context:
space:
mode:
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,