summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-22 23:41:13 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-22 23:41:13 -0400
commit1ed5d98cbb2273e75674d050fb48e3c3422a3877 (patch)
tree1c840100535c0c57f266b37922fa08fad1ccedb7 /kernel
parent14283fe73fb5e432a7af45de94961655714910f6 (diff)
downloadopen-iov-1ed5d98cbb2273e75674d050fb48e3c3422a3877.tar.gz
open-iov-1ed5d98cbb2273e75674d050fb48e3c3422a3877.zip
kernel: widen PCFG mirror watch to link-cap aliases (debug helper)
Logs changes to NV_PMC_BOOT_1 (0x4), the low PCFG alias, the BAR0 PCFG block (0x880000/0x880080/0x880084/0x880088/0x88008c) and the VF-window aliases. Observed during a CUDA run: the guest never writes any of them, so the link-cap values we pre-set (0x103 / 0x01030000) are not clobbered. Reads are not observable through the mmap'd BAR0.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/gsp_emulation.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/kernel/gsp_emulation.c b/kernel/gsp_emulation.c
index 969d4fd..833ce42 100644
--- a/kernel/gsp_emulation.c
+++ b/kernel/gsp_emulation.c
@@ -305,15 +305,24 @@ static void gsp_emu_poll_boot(struct gsp_emu_context *ctx)
}
}
- /* Temporary: watch the PCFG link-caps mirror for guest writes */
+ /* Temporary: watch PCFG / link-cap mirror offsets for guest writes */
{
- static u32 last_linkcap;
- u32 v = gsp_emu_shadow_read32(ctx, 0x88084);
+ static const u32 watch[] = {
+ 0x000004, 0x000084, 0x880000, 0x880004, 0x880080,
+ 0x880084, 0x880088, 0x88008c, 0xb80084, 0xb88084,
+ 0xc08084,
+ };
+ static u32 last[ARRAY_SIZE(watch)];
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(watch); i++) {
+ u32 v = gsp_emu_shadow_read32(ctx, watch[i]);
- if (v != last_linkcap) {
- nv_vgpu_info(ctx->vgpu, "GSP-BOOT: PCFG[0x88084] = 0x%x (was 0x%x)",
- v, last_linkcap);
- last_linkcap = v;
+ if (v != last[i]) {
+ nv_vgpu_info(ctx->vgpu, "GSP-BOOT: PCFG[0x%x] = 0x%x (was 0x%x)",
+ watch[i], v, last[i]);
+ last[i] = v;
+ }
}
}