diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-06 23:11:29 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-06 23:11:29 -0400 |
| commit | 292919c88d12234fd12348bc2a4852326a4491e9 (patch) | |
| tree | dce735a87dc727cc40936dd1ce21aaa97ae95122 | |
| parent | f27e38956df2705d797f0639c8a851b0c3c41209 (diff) | |
| download | open-iov-292919c88d12234fd12348bc2a4852326a4491e9.tar.gz open-iov-292919c88d12234fd12348bc2a4852326a4491e9.zip | |
vgsp: m64 fix - keep the module-sem fallback observable via sem_va (not chunk DMA __va)
The forward's poll already falls back to the SEM chunk kernel VA when
qmd_rel_hpa is 0; the m64 change set qmd_rel_hpa to the chunk DMA address,
whose __va() alias is not the chunk mapping, so the m64 poll read garbage.
Revert to qmd_rel_hpa=0 for the module-release fallback and read the SEM
chunk via sem_va in the post-mortem relw (plus the release word at rel_off
in the release-page dump).
| -rw-r--r-- | kernel/gsp_phys_booter.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index 40dfca3..5aac73c 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -15763,13 +15763,10 @@ int gsp_phys_backend_guest_gr_submit(const struct gsp_phys_gr_submit *req, want_qmd = qmd[25]; qmd_rel = true; /* - * m64: the module-sem fallback must poll the SEM chunk, - * otherwise a completed QMD is unobservable (the poll - * only reads qmd_rel_hpa). + * The module-sem fallback leaves qmd_rel_hpa 0 so the + * poll reads the SEM chunk through sem_va below. */ - qmd_rel_hpa = (u64)gsp_phys_chunk_page_dma( - &boot_stage.rmcall_chunks - [GSP_PHYS_RMCALL_BUF_SEM], 0); + qmd_rel_hpa = 0; qmd_rel_off = 0; } } @@ -16269,6 +16266,8 @@ gr_page_unmapped: relw = READ_ONCE( *(u32 *)((u8 *)__va(qmd_rel_hpa) + qmd_rel_off)); + else if (qmd_rel) + relw = READ_ONCE(*(u32 *)sem_va); pr_info("vgsp-gr: post-mortem gpget=%u->%u qmd_page w0=%08x w1=%08x w23..25=%08x %08x %08x w48..53=%08x %08x %08x %08x %08x %08x w63=%08x relw=%08x iq2m=%s%s\n", sub.gpget, gpget_post, q0, q1, q23, q24, q25, q48, q49, q50, q51, q52, q53, q63, @@ -16301,16 +16300,11 @@ gr_page_unmapped: get_unaligned_le32(qp + 60)); } if (req->rel_hpa) - pr_info("vgsp-gr: post-mortem release page hpa=0x%llx off=0x%x w0..7 = %08x %08x %08x %08x %08x %08x %08x %08x\n", + pr_info("vgsp-gr: post-mortem release page hpa=0x%llx off=0x%x rel=%08x w0=%08x w4=%08x\n", req->rel_hpa, req->rel_off, + get_unaligned_le32((u8 *)__va(req->rel_hpa) + req->rel_off), get_unaligned_le32((u8 *)__va(req->rel_hpa)), - get_unaligned_le32((u8 *)__va(req->rel_hpa) + 4), - get_unaligned_le32((u8 *)__va(req->rel_hpa) + 8), - get_unaligned_le32((u8 *)__va(req->rel_hpa) + 12), - get_unaligned_le32((u8 *)__va(req->rel_hpa) + 16), - get_unaligned_le32((u8 *)__va(req->rel_hpa) + 20), - get_unaligned_le32((u8 *)__va(req->rel_hpa) + 24), - get_unaligned_le32((u8 *)__va(req->rel_hpa) + 28)); + get_unaligned_le32((u8 *)__va(req->rel_hpa) + 4)); if (bar0) pr_info("vgsp-gr: FE readback raw 0x40a500..0x40a50c = %08x %08x %08x %08x (subctx-1 control at 0x40a504)\n", ioread32(bar0 + 0x0040a500u), |
