summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-23 00:09:13 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-23 00:09:13 -0400
commitd28e5bb94752ba523b826945409e5ad3206dad5a (patch)
treee0247ceff689257e2246a8691fb448e1568bc952 /kernel
parent7d6c789a469de154ee6d26a7fb9161ef7279a34a (diff)
downloadopen-iov-d28e5bb94752ba523b826945409e5ad3206dad5a.tar.gz
open-iov-d28e5bb94752ba523b826945409e5ad3206dad5a.zip
kernel: drop PCFG poison experiment and config-write spam, keep bus-info detail log
The poison test (fill every dword of BAR0 0x88000-0x88FFF, 0xB80000- 0xB80EFF, 0xC08000-0xC08EFF with 0x103) did not change the CUDA "Unknown PCIe speed" failure, proving the failing BUS_GET_INFO_V2 index-3 data does not come from any BAR0 mirror read. Combined with the QEMU config-space behavior (link registers zeroed, type=0x92, 0x84 never read from us) the value must come from the VGPU_STATIC_INFO branch in getBusInfos (pVSI-> pcieGpuLinkCaps), i.e. the guest needs the host vGPU static-info payload. Cleanup: remove the poison loops and the per-write CFGWR log; keep the once-per-init PCIe cap print and add per-entry BUS_GET_INFO_V2 logging (index+data) for the ongoing CUDA/UVM work.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/bar_emulation.c15
-rw-r--r--kernel/gsp_rm_emulation.c4
-rw-r--r--kernel/main.c6
3 files changed, 4 insertions, 21 deletions
diff --git a/kernel/bar_emulation.c b/kernel/bar_emulation.c
index 1229a77..2d82303 100644
--- a/kernel/bar_emulation.c
+++ b/kernel/bar_emulation.c
@@ -309,21 +309,6 @@ int nv_vgpu_bar_emul_init(struct nv_vgpu_device *vgpu)
*(u32 *)((u8 *)ctx->bar0_shadow + 0xC08084) = 0x00000103;
*(u32 *)((u8 *)ctx->bar0_shadow + 0xC08088) = 0x01030000;
- /* TEMP EXPERIMENT: poison the candidate mirror windows with the
- * Gen3 x16 link-caps value in every dword, to locate where the
- * driver's gpuReadBusConfigReg(0x84) actually lands. Ranges are
- * chosen to avoid real emulated registers (the CPU intr tree starts
- * at 0xB81000). */
- {
- u32 off;
-
- for (off = 0x88000; off < 0x89000; off += 4)
- *(u32 *)((u8 *)ctx->bar0_shadow + off) = 0x00000103;
- for (off = 0xB80000; off < 0xB80F00; off += 4)
- *(u32 *)((u8 *)ctx->bar0_shadow + off) = 0x00000103;
- for (off = 0xC08000; off < 0xC08F00; off += 4)
- *(u32 *)((u8 *)ctx->bar0_shadow + off) = 0x00000103;
- }
/*
* Serve a valid VBIOS at the PROM window (BAR0+0x300000).
diff --git a/kernel/gsp_rm_emulation.c b/kernel/gsp_rm_emulation.c
index 743a260..1f029b1 100644
--- a/kernel/gsp_rm_emulation.c
+++ b/kernel/gsp_rm_emulation.c
@@ -1454,6 +1454,10 @@ static void gsp_rm_handle_bus_get_info_v2(struct gsp_emu_context *ctx,
nv_vgpu_info(ctx->vgpu, "GSPRM: BUS_GET_INFO_V2 -> %u entries populated (first idx=0x%x)",
count, count ? reply->busInfoList[0].index : 0);
+ for (i = 0; i < count; i++)
+ nv_vgpu_info(ctx->vgpu, "GSPRM: bus[%u] idx=0x%x data=0x%x",
+ i, reply->busInfoList[i].index,
+ reply->busInfoList[i].data);
}
static void gsp_rm_handle_rm_control(struct gsp_emu_context *ctx,
diff --git a/kernel/main.c b/kernel/main.c
index 451fa55..3e50e28 100644
--- a/kernel/main.c
+++ b/kernel/main.c
@@ -744,12 +744,6 @@ static ssize_t nv_vgpu_vfio_dev_write(struct vfio_device *vdev, const char __use
if (pos >= 0x70000000000ULL && pos < 0x70000000000ULL + 4096) {
loff_t cfg_pos = pos - 0x70000000000ULL;
ssize_t ret;
- u8 wbuf[8];
-
- if (count <= sizeof(wbuf) && !copy_from_user(wbuf, buf, count))
- nv_vgpu_info(vgpu, "CFGWR off=0x%llx count=%zu data=%*phN",
- (unsigned long long)cfg_pos, count,
- (int)count, wbuf);
ret = nv_vgpu_config_write(vgpu, buf, count, &cfg_pos);
if (ret > 0)