summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-20 23:34:29 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-20 23:34:29 -0400
commit52a84dbe8908e51bbfa5eed7d207477946436749 (patch)
treebcbb4fe250b39ef5ea644d63c9f9a01a1aa6c613
parent89a6497e78027be58069af84a7a77a5beaf3a971 (diff)
downloadopen-iov-52a84dbe8908e51bbfa5eed7d207477946436749.tar.gz
open-iov-52a84dbe8908e51bbfa5eed7d207477946436749.zip
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).
-rw-r--r--kernel/gsp_sema_service.c11
1 files changed, 10 insertions, 1 deletions
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) &