From 3d0c6cc60489e900ed2324f60bfa67a19cd7989d Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Tue, 20 Oct 2026 17:06:24 -0400 Subject: sema: page-note resolution diagnostic (va/pa/ap/branch) for the launch-page vs readback disagreement (sum=0 class); budget 512 --- kernel/gsp_sema_service.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c index f9ab990..83dfcc7 100644 --- a/kernel/gsp_sema_service.c +++ b/kernel/gsp_sema_service.c @@ -3122,6 +3122,8 @@ static void svc_pool_wr_note(u32 h, u64 va, u64 pa, const char *src, static u64 svc_ledger_pin_repairs; /* r372: pool alt fan-outs skipped because the primary pin moved on. */ static u64 svc_pool_alt_skipped; +/* r372: bounded page-note resolution diagnostics (va/pa/ap/branch). */ +static u32 svc_gr_pagenote_log; /* * Fan a pool release out to the last displaced translation of the same page @@ -16369,6 +16371,8 @@ static void svc_gr_page_note(struct nv_vgpu_device *vgpu, u64 va, u32 qmd_word) u64 pa = 0; u32 ap = 0; u32 i; + /* r372 diagnostic: which branch resolved this launch page. */ + const char *src = "?"; if (!page) return; @@ -16442,7 +16446,8 @@ static void svc_gr_page_note(struct nv_vgpu_device *vgpu, u64 va, u32 qmd_word) svc_pin_store(page, ipa & ~(u64)(SEMA_PAGE_SIZE - 1), iap); - return; + src = "ipin"; + goto note_done; } } if (!svc_ledger_lookup(page, &lpa, &lap)) { @@ -16473,7 +16478,10 @@ static void svc_gr_page_note(struct nv_vgpu_device *vgpu, u64 va, u32 qmd_word) */ svc_pin_store(page, lpa & ~(u64)(SEMA_PAGE_SIZE - 1), (int)lap); - return; + pa = lpa; + ap = lap; + src = "ledger"; + goto note_done; } } if (svc_resolve_va(vgpu, page, &pa, &ap)) @@ -16495,6 +16503,20 @@ static void svc_gr_page_note(struct nv_vgpu_device *vgpu, u64 va, u32 qmd_word) (u32)svc_ap_of(ap)); svc_pin_store(page, pa & ~(u64)(SEMA_PAGE_SIZE - 1), (int)svc_ap_of(ap)); + src = "walk"; +note_done: + /* + * r372 diagnostic: the exact (pa, ap) and branch the launch page + * resolved through - the value the engine's hpa and the copy-out use. + * A D2H readback that lands elsewhere (the sum=0 class) names its + * disagreement against these lines. + */ + if (svc_gr_pagenote_log < 512) { + svc_gr_pagenote_log++; + pr_info("sema-gr: page-note va=0x%llx pa=0x%llx ap=%u src=%s qmd=%u\n", + page, svc_fwd_req.gr_pages[i].pa, + svc_fwd_req.gr_pages[i].ap, src, qmd_word); + } } /* Does any captured inline write land in this page? */ -- cgit v1.2.3