summaryrefslogtreecommitdiffstats
path: root/wiki/GSP-RPC-Emulation.md
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-23 00:04:14 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-23 00:04:14 -0400
commit7d6c789a469de154ee6d26a7fb9161ef7279a34a (patch)
tree08daeca568f6e22267617bd8f86c5e4d58d3482d /wiki/GSP-RPC-Emulation.md
parent1ed5d98cbb2273e75674d050fb48e3c3422a3877 (diff)
downloadopen-iov-7d6c789a469de154ee6d26a7fb9161ef7279a34a.tar.gz
open-iov-7d6c789a469de154ee6d26a7fb9161ef7279a34a.zip
kernel: real TU104 config-space layout (PCIe cap at 0x78) + CUDA/UVM tracing
Move the emulated PCIe capability to config offset 0x78 and shift MSI to 0x48 / MSI-X to 0x68, matching the real TU104 (host lspci: PM 0x60, MSI 0x68, Express 0x78). This matters because the driver's NV_PCFG mirror (BAR0+0x88000, size 0x1000) is read as PCI config space: osDevReadReg032 -> vgpuDevReadReg032 intercepts [NV_PCFG, +0x30) (or the full 0x1000 for SRIOV) and forwards to osPciReadDword, so NV_XVE_LINK_CAPABILITIES (0x84) must be the PCIe Link Capabilities register, i.e. cap+0x0C with the cap at 0x78. Link Caps = Gen3 x16 (0x103), Link Status = 0x0103. Also set MCFG-visible caps: the guest now reports MSI [48], MSI-X [68], Express [78] exactly like the host GPU. Fixing the capability chain: the first attempt set the PCIe cap's NEXT to 0x0C, which broke enumeration (device 00:06.0 disappeared from the guest) - NEXT must terminate at 0. Unknown still open: QEMU presents type=0x92 (Root Complex Integrated Endpoint) and zeroes 0x84-0x8B in its config cache (never read from us, not refreshed by writes), and poisoning all BAR0 mirror windows with 0x103 does not change the driver's "Unknown PCIe speed" - so the value comes from the VGPU_STATIC_INFO branch (pVSI->pcieGpuLinkCaps, IS_VIRTUAL true via hypervisor detection) rather than any register read. Debug helpers added (temporary): CFGWR config-write log, PCFG change watch, PCIe-cap print at init.
Diffstat (limited to 'wiki/GSP-RPC-Emulation.md')
0 files changed, 0 insertions, 0 deletions