diff options
| -rw-r--r-- | kernel/gsp_sema_service.c | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c index 13caf9a..800b256 100644 --- a/kernel/gsp_sema_service.c +++ b/kernel/gsp_sema_service.c @@ -9083,6 +9083,13 @@ static void svc_counter_publish(struct nv_vgpu_device *vgpu, if (!ch->counter_pa) return; svc.counter_pub_calls++; + if (gsp_sema_dbg && !ch->engine_type && + svc.counter_pub_dbg < 96) { + svc.counter_pub_dbg++; + pr_info("sema-chan: pub-info h=0x%x rank=%u pa=0x%llx put=%u last=%u\n", + ch->h_object, ch->gr_index, ch->counter_pa, put, + ch->counter_last); + } svc_counter_flush_pending(vgpu, ch); val = put; @@ -11451,6 +11458,35 @@ static void svc_pump_channels(struct nv_vgpu_device *vgpu) svc_counter_autoreg(vgpu, ch, n_gr); svc_counter_flush_pending(vgpu, ch); /* + * FORENSICS-grv5 E1 (debug-gated): the fixed-total + * build maps a rank's counter slot onto the same word + * the push's REPORT_SEM release writes, so publish is a + * structural no-op (cur=1 already) while the client + * still waits - green m104/m141 had *every* slot in the + * 0x20400f000 page reach 1 (13 releases + formula + * publishes) before the client unblocked. Replicate + * green's end state for channels whose slot is still 0: + * write 1 once, forward-only, to the proof-gated + * registration. Diagnostic only (sema_dbg); if the + * client unblocks, the durable rule replaces this. + */ + if (gsp_sema_dbg && !ch->engine_type && + ch->counter_pa && svc.counter_pub_dbg < 96) { + u32 mcur = 0, mval = 1; + + if (!svc_read_ap(vgpu, ch->counter_pa, + SVC_APERTURE_SYS, &mcur, + sizeof(mcur)) && mcur == 0 && + !svc_write_ap(vgpu, ch->counter_pa, + SVC_APERTURE_SYS, &mval, + sizeof(mval))) { + svc.counter_pub_dbg++; + pr_info("sema-chan: pub-mirror h=0x%x rank=%u pa=0x%llx val=1 (was 0)\n", + ch->h_object, ch->gr_index, + ch->counter_pa); + } + } + /* * H3 (FORENSICS-v2): the end-of-pass publish below is * unreachable on the passes that early-`continue` * before it (USERD not resolvable, GP_PUT unreadable) @@ -12646,6 +12682,26 @@ static void svc_pump_channels(struct nv_vgpu_device *vgpu) g = ch->last_get; svc_write_ap(vgpu, ch->userd_pa + SVC_USERD_GP_GET, ch->userd_as, &g, sizeof(g)); + /* + * FORENSICS-grv5 E2 (debug-gated): the GP_GET + * write-back has never been read back; if the + * client reads a different USERD it re-queues the + * same entry0 forever. One line per GR consume. + */ + if (gsp_sema_dbg && !ch->engine_type && + svc.counter_pub_dbg < 96) { + u32 grad = 0, pnow = 0; + + svc_read_ap(vgpu, + ch->userd_pa + SVC_USERD_GP_GET, + ch->userd_as, &grad, sizeof(grad)); + svc_read_ap(vgpu, + ch->userd_pa + SVC_USERD_GP_PUT, + ch->userd_as, &pnow, sizeof(pnow)); + svc.counter_pub_dbg++; + pr_info("sema-chan: gr-get-back h=0x%x wrote=%u read=%u put=%u\n", + ch->h_object, g, grad, pnow); + } } /* |
