summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-07 14:02:27 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-07 14:02:27 -0400
commitc9e7d41a70dd2212a927f42fcf4acbddb733bdd7 (patch)
tree6283cb4cd735e2c9b03f35cd6fafafbf736a8590 /kernel
parent320c679a470b9eb31dd111b7189b07316298c23a (diff)
downloadopen-iov-c9e7d41a70dd2212a927f42fcf4acbddb733bdd7.tar.gz
open-iov-c9e7d41a70dd2212a927f42fcf4acbddb733bdd7.zip
vgsp: m98 - dump the program prologue (entry offset) and the param/const-0 page at launch
m97 settled the fetch question: zeros planted at the QMD's program offset executed and trapped ILLEGAL_INSTR_ENCODING (0x9) at PC=0x109800 - the SM instruction fetch and const reads through our shadows work; the m90-m96 MMU_NACK at PC=0x109880 is a memory access by the prologue instruction at +0x80, almost certainly the first global load using a guest-VA device pointer from the param buffer (c[0x0]). Dump the program page from the entry offset (40 words) and the param page (16 words) so the access instruction and its pointer arguments are visible in the log.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/gsp_phys_booter.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c
index 28bf6f9..19fb67e 100644
--- a/kernel/gsp_phys_booter.c
+++ b/kernel/gsp_phys_booter.c
@@ -16444,6 +16444,37 @@ int gsp_phys_backend_guest_gr_submit(const struct gsp_phys_gr_submit *req,
GSP_PHYS_PAGE_SIZE);
copied++;
}
+ /*
+ * m98: dump the program prologue (qmd_word 48, from
+ * the QMD's in-page entry offset) and the param/const-0
+ * page (qmd_word 32, from page start) so the first
+ * data-access instruction and the guest VA arguments it
+ * fetches can be read from the log.
+ */
+ if (pg->hpa && pg->qmd_word == 48u) {
+ u32 po = (qmd[48] &
+ (GSP_PHYS_PAGE_SIZE - 1)) / 4;
+ const u32 *w = (const u32 *)sh_page + po;
+
+ pr_info("vgsp-gr: program +0x%x: %08x %08x %08x %08x %08x %08x %08x %08x | %08x %08x %08x %08x %08x %08x %08x %08x | %08x %08x %08x %08x %08x %08x %08x %08x | %08x %08x %08x %08x %08x %08x %08x %08x | %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ po * 4,
+ 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], w[16],
+ w[17], w[18], w[19], w[20], w[21],
+ w[22], w[23], w[24], w[25], w[26],
+ w[27], w[28], w[29], w[30], w[31],
+ w[32], w[33], w[34], w[35], w[36],
+ w[37], w[38], w[39]);
+ }
+ if (pg->hpa && pg->qmd_word == 32u) {
+ const u32 *w = (const u32 *)sh_page;
+
+ pr_info("vgsp-gr: param page: %08x %08x %08x %08x %08x %08x %08x %08x | %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ 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]);
+ }
for (j = 0; j < req->n_inl; j++) {
const struct gsp_phys_gr_inline *inl =
&req->inl[j];