summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-07 16:42:10 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-07 16:42:10 -0400
commitb50dbd98915d6557c165642298b06e017f96f64c (patch)
tree8281786740a55feee3579f42d5f75b6ca831ae79
parentd94b2896594771917e388231588fae34f921e226 (diff)
downloadopen-iov-b50dbd98915d6557c165642298b06e017f96f64c.tar.gz
open-iov-b50dbd98915d6557c165642298b06e017f96f64c.zip
vgsp: m120 - data-fill 32 pages/ptr under the 100 cap + rewrite hit/coverage logging + param 0x150 dump + main-PT slot dump
-rw-r--r--kernel/gsp_phys_booter.c34
-rw-r--r--kernel/gsp_sema_service.c16
2 files changed, 48 insertions, 2 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c
index c2776a0..39c8a3a 100644
--- a/kernel/gsp_phys_booter.c
+++ b/kernel/gsp_phys_booter.c
@@ -16335,6 +16335,12 @@ static void gsp_phys_gr_rewrite_data_vars(u32 *w, u32 n_words,
if (req->data[x].va != wb ||
!req->data[x].reloc_va)
continue;
+ /* m120: log the hit site so coverage is provable. */
+ if (rew < 16)
+ pr_info("vgsp-gr: bank %u hit @0x%x: 0x%llx -> 0x%llx\n",
+ bank, k * 4, v,
+ req->data[x].reloc_va |
+ (v & 0xfffULL));
v = req->data[x].reloc_va | (v & 0xfffULL);
w[k] = (u32)v;
w[k + 1] = (u32)(v >> 32);
@@ -16784,6 +16790,14 @@ int gsp_phys_backend_guest_gr_submit(const struct gsp_phys_gr_submit *req,
w[0], w[1], w[2], w[3], w[4], w[5],
w[6], w[7], w[8], w[9], w[10], w[11],
w[12], w[13], w[14], w[15]);
+ /* m120: the new binary's first LDG base is
+ * c[0x0][0x168] (msg) / [0x160] (out) -
+ * bytes outside the 64 B window above. */
+ pr_info("vgsp-gr: param page +0x150: %08x %08x %08x %08x %08x %08x %08x %08x | %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ w[84], w[85], w[86], w[87], w[88],
+ w[89], w[90], w[91], w[92], w[93],
+ w[94], w[95], w[96], w[97], w[98],
+ w[99]);
}
if (pg->hpa && pg->qmd_word > 32u && pg->qmd_word <= 46u &&
!(pg->qmd_word & 1)) {
@@ -17125,6 +17139,26 @@ gr_page_unmapped:
pr_info("vgsp-gr: qmd w0..3=%08x %08x %08x %08x w4..7=%08x %08x %08x %08x w23..25=%08x %08x %08x w32/33=%08x %08x w48/49=%08x %08x\n",
qmd[0], qmd[1], qmd[2], qmd[3], qmd[4], qmd[5], qmd[6], qmd[7],
qmd[23], qmd[24], qmd[25], qmd[32], qmd[33], qmd[48], qmd[49]);
+ /* m120: dump the main PT page slots 0x100..0x11f so the PTE content
+ * the walker would read (win0 + bounce window) is visible in the log. */
+ {
+ struct gsp_phys_boot_chunk *pt_c =
+ &boot_stage.rmcall_chunks[GSP_PHYS_RMCALL_BUF_PT];
+
+ if (pt_c->pages) {
+ const __le64 *pv =
+ (const __le64 *)gsp_phys_chunk_page_va(pt_c, 0);
+ u32 s;
+
+ for (s = 0x100; s < 0x120; s += 8)
+ pr_info("vgsp-gr: main PT[%03x..%03x]=%016llx %016llx %016llx %016llx %016llx %016llx %016llx %016llx\n",
+ s, s + 7,
+ le64_to_cpu(pv[s]), le64_to_cpu(pv[s + 1]),
+ le64_to_cpu(pv[s + 2]), le64_to_cpu(pv[s + 3]),
+ le64_to_cpu(pv[s + 4]), le64_to_cpu(pv[s + 5]),
+ le64_to_cpu(pv[s + 6]), le64_to_cpu(pv[s + 7]));
+ }
+ }
ret = gsp_phys_rmcall_publish_locked(bar0, boot_stage.rmcall_va_pb,
words, &sub);
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index 830b1d7..0be279e 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -9560,8 +9560,12 @@ static bool svc_gr_page_inline_covers(u64 page)
* Per candidate pointer, map at most this many pages from the pointer's
* page onward (the engine-visible main-PT window has ~220 free 4 KB slots;
* the demo buffers are small on the native path).
+ * m120: lowered 64 -> 32 so every pointer page fits under the 100-page
+ * bounce cap (mail 2x32=64, vadd 3x32=96); at 64/ptr the second/third
+ * candidate run was truncated by the cap and its pointer word never
+ * rewritten (m119: first LDG base c[0x0][0x168] possibly untouched).
*/
-#define SVC_GR_DATA_PAGES_PER_PTR 64u
+#define SVC_GR_DATA_PAGES_PER_PTR 32u
/* m114: total pages the pre-commit bounce window can carry (slot 100 is
* the mail message). */
#define SVC_GR_DATA_BOUNCE_MAX 100u
@@ -9620,6 +9624,7 @@ static void svc_gr_data_fill(struct nv_vgpu_device *vgpu)
for (w = 0; w < n_cand; w++) {
u64 base = wins[w];
u32 p;
+ u32 before = svc_fwd_req.gr_n_data;
for (p = 0; p < SVC_GR_DATA_PAGES_PER_PTR; p++) {
u64 va = wins[w] + (u64)p * SEMA_PAGE_SIZE;
@@ -9636,8 +9641,12 @@ static void svc_gr_data_fill(struct nv_vgpu_device *vgpu)
continue; /* already mapped */
if (svc_resolve_va(vgpu, va, &pa, &ap))
break;
- if (svc_fwd_req.gr_n_data >= SVC_GR_DATA_BOUNCE_MAX)
+ if (svc_fwd_req.gr_n_data >= SVC_GR_DATA_BOUNCE_MAX) {
+ pr_info("vgsp-sema: svc-gr data fill: %u candidate ptrs, %u pages resolved (reloc 0x%llx+) CAP-HIT\n",
+ n_cand, svc_fwd_req.gr_n_data,
+ (u64)SVC_GR_DATA_RELOC_BASE);
return;
+ }
rec = &svc_fwd_req.gr_data[svc_fwd_req.gr_n_data];
rec->va = va;
rec->pa = pa & ~(u64)(SEMA_PAGE_SIZE - 1);
@@ -9647,6 +9656,9 @@ static void svc_gr_data_fill(struct nv_vgpu_device *vgpu)
svc_fwd_req.gr_n_data++;
}
(void)base;
+ pr_info("vgsp-sema: svc-gr candidate[%u] base=0x%llx -> %u new pages (total %u)\n",
+ w, base, svc_fwd_req.gr_n_data - before,
+ svc_fwd_req.gr_n_data);
}
pr_info("vgsp-sema: svc-gr data fill: %u candidate ptrs, %u pages resolved (reloc 0x%llx+)\n",
n_cand, svc_fwd_req.gr_n_data, (u64)SVC_GR_DATA_RELOC_BASE);