summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_sema_service.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-21 00:08:14 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-21 00:08:14 -0400
commit1c37e483c205eff947de33a37545a07af71a5d73 (patch)
treeb0c01cf161ba63a55530c7136c657a160062421f /kernel/gsp_sema_service.c
parent243a40f6f715f410864c75731ad57062c6ce6fcb (diff)
downloadopen-iov-1c37e483c205eff947de33a37545a07af71a5d73.tar.gz
open-iov-1c37e483c205eff947de33a37545a07af71a5d73.zip
sema/boot: r391e print the shadow base pointer in the copy-out and bigcopy witnesses
Rule in/out a stale or duplicate vgpu->bars[1] shadow between the launch copy-out (svc_fwd_req.vgpu) and the D2H reader (svc_copy's vgpu): the sum=0 runs show the write landing (OUT-PAGE-POST val8 = the sum) and the reader of the same ledger page reading zeros 8 ms later with no logged writer in between. Diagnostic only.
Diffstat (limited to 'kernel/gsp_sema_service.c')
-rw-r--r--kernel/gsp_sema_service.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index 2fb4fe1..40a8867 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -6213,10 +6213,10 @@ static int svc_copy(struct nv_vgpu_device *vgpu, u64 dst, u64 src, size_t total,
} else {
svc_read(vgpu, dst, db, sizeof(db));
}
- pr_info("sema-bigcopy: dst_va=0x%llx -> pa=0x%llx ap=%u prov=%u shadow=%u | src_va=0x%llx -> pa=0x%llx ap=%u prov=%u shadow=%u | bytes=%zu\n",
+ pr_info("sema-bigcopy: dst_va=0x%llx -> pa=0x%llx ap=%u prov=%u shadow=%u | src_va=0x%llx -> pa=0x%llx ap=%u prov=%u shadow=%u | bytes=%zu vbase=%px\n",
dst_orig, dst, dst_aperture, dst_prov, dst_shadow,
src_orig, src, src_aperture, src_prov, src_shadow,
- total);
+ total, (void *)vgpu->bars[1].vaddr);
/*
* r348 diagnostic: for a high-VA SYS source name the exact
* host PA this read will touch (gpa_to_hpa) - the direct
@@ -17500,6 +17500,13 @@ bool gsp_sema_gr_va_snap(u64 va, u64 *pa, u32 *ap, u64 *val8)
return true;
}
+/* r391 diagnostic: the shadow base this service resolves through (compare
+ * against the CE copy path's own vgpu->bars[1].vaddr in the same run). */
+u8 *gsp_sema_gr_shadow_base(void)
+{
+ return svc_fwd_req.vgpu ? svc_fwd_req.vgpu->bars[1].vaddr : NULL;
+}
+
/*
* m144 (second-client launch-state divergence): collect device-VA-shaped
* candidate pointers from the bytes the ENGINE will actually execute.