From 0cbff293ccbecfea528e3f987cf1fa3cbd050969 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Wed, 30 Sep 2026 13:43:30 -0400 Subject: GSPRM BUS_GET_PCI_BAR_INFO: reply the canonical 8-entry params struct The control is cacheable in the guest kernel (RMCTRL_FLAGS_CACHEABLE) and rmapiControlCacheSet validates paramsSize against the canonical sizeof(NV2080_CTRL_BUS_GET_PCI_BAR_INFO_PARAMS) = 200. We replied only 8 + 4*24 = 104 bytes, so every reply tripped NV_ERR_INVALID_PARAMETER in rmapiControlCacheSet (rpc.c:9998) and the BAR-info cache entry was never populated. Zero-fill and report all eight NV2080_CTRL_BUS_PCI_BAR_INFO entries (count still 4). --- kernel/gsp_rm_emulation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/gsp_rm_emulation.c b/kernel/gsp_rm_emulation.c index 76d4eba..ff65275 100644 --- a/kernel/gsp_rm_emulation.c +++ b/kernel/gsp_rm_emulation.c @@ -1460,7 +1460,7 @@ static void gsp_rm_handle_bus_get_pci_bar_info(struct gsp_emu_context *ctx, memcpy(e + 16, &offsets[i], 8); } - *out_params_size = 8 + count * 24; + *out_params_size = 8 + 8 * 24; *out_status = 0; nv_vgpu_info(ctx->vgpu, "GSPRM: BUS_GET_PCI_BAR_INFO -> %u BARs (BAR1=%uMB)", -- cgit v1.2.3