From 52a84dbe8908e51bbfa5eed7d207477946436749 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Tue, 20 Oct 2026 23:34:29 -0400 Subject: sema: r391b fix svc_op_translate polarity in the per-page fill resolver svc_op_translate returns 0 on success; the new svc_fill_dst_page_pa tested it without negation, so every page answerable only by the walk/scan returned -ENOENT and the fill truncated (r391 boot: FILL-TRUNC for the page-table writes at va=0x...a00200 -> the client stalled at init). Also demand the unresolved page through the pin channel before failing (stalled VA row -> the userspace stream pushes it to the guest scanner). --- kernel/gsp_sema_service.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'kernel/gsp_sema_service.c') diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c index 2d41bb0..97cbf57 100644 --- a/kernel/gsp_sema_service.c +++ b/kernel/gsp_sema_service.c @@ -4767,7 +4767,7 @@ static int svc_fill_dst_page_pa(struct nv_vgpu_device *vgpu, u64 va, *ap_out = aper; return 0; } - if (svc_op_translate(vgpu, page, &pa, &aper)) { + if (!svc_op_translate(vgpu, page, &pa, &aper)) { *prov_out = 3; *pa_out = pa; *ap_out = aper; @@ -5035,6 +5035,15 @@ static int svc_fill(struct nv_vgpu_device *vgpu, u64 addr, u64 value, u32 elem, if (prc) { if (done_out) *done_out = (u64)o; + /* + * r391: demand the exact page through the pin + * channel (the userspace stream pushes this VA + * to the in-guest scanner) and hold the fill + * for a bounded retry - never write through a + * contiguous guess past a missing page. + */ + svc_log_stalled_va((va0 + o) & + ~(u64)(SEMA_PAGE_SIZE - 1)); pr_err_ratelimited("vgsp: FILL-TRUNC va=0x%llx want=0x%llx done=0x%llx path=sema-fill (page 0x%llx unresolved)\n", va0, (u64)total, (u64)o, (va0 + o) & -- cgit v1.2.3