diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-29 22:27:38 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-29 22:27:38 -0400 |
| commit | 00029efeb349bfe090900a36d87cb6186ec02c34 (patch) | |
| tree | 526ccfc6f0fe6760b21f5b8c1af5b6ca3e8bc8fe /kernel/gsp_rm_emulation.c | |
| parent | 097f7820ca0371309edb39f436bc118fd956df1f (diff) | |
| download | open-iov-00029efeb349bfe090900a36d87cb6186ec02c34.tar.gz open-iov-00029efeb349bfe090900a36d87cb6186ec02c34.zip | |
vgsp: RUSD INIT_USER_SHARED_DATA (0x20800afe) handler + gsp-phys-shared-bit0 knob - direct client channel alloc gate broken open (c46f hObject=0xbeef0101, err@ReadPixels=0x0 px=255,0,255,0) - SESSION 153 r999-r1002HEADmaster
Diffstat (limited to 'kernel/gsp_rm_emulation.c')
| -rw-r--r-- | kernel/gsp_rm_emulation.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/kernel/gsp_rm_emulation.c b/kernel/gsp_rm_emulation.c index 653ff1d..2f63bcd 100644 --- a/kernel/gsp_rm_emulation.c +++ b/kernel/gsp_rm_emulation.c @@ -4412,6 +4412,42 @@ static void gsp_rm_handle_rm_control(struct gsp_emu_context *ctx, break; } + case 0x20800afe: { /* NV2080_CTRL_CMD_INTERNAL_INIT_USER_SHARED_DATA + * + * The guest kernel driver hands the GSP-RM the physical + * address of the RUSD (RM user shared data) page it + * allocated; on real hardware the GSP registers the + * memdesc and keeps the page's sequence-guarded fields + * (clocks, BAR1, utilisation, ...) populated, and 0 + * de-initialises it. Nothing here performs that upkeep, + * and consumers treat a zeroed sequence word as "data + * invalid" and skip the fields, so the correct emulated + * behaviour is to acknowledge the registration, echo the + * request (the caller may read the address back) and log + * the address once so the page can be correlated with + * guest RAM during diagnosis. */ + u8 *rp = reply + GSP_RM_CTRL_HDR_SIZE; + const u8 *pp = req_data + GSP_RM_CTRL_HDR_SIZE; + + if (req.paramsSize >= 8) { + u64 phys_addr; + + memcpy(&phys_addr, pp, 8); + memcpy(rp, pp, req.paramsSize); + rm->rusd_phys_addr = phys_addr; + rm->rusd_init_seen = true; + nv_vgpu_info(ctx->vgpu, + "vgsp-rm: INIT_USER_SHARED_DATA physAddr=0x%llx (RUSD registered; fields left at sequence 0 = 'data invalid', consumers skip)", + phys_addr); + out_status = 0; + out_params_size = req.paramsSize; + } else { + out_status = 0; + out_params_size = 0; + } + break; + } + case 0x2080a097: { /* client-pending engine-context query (session 75) * * libnvidia-eglcore issues this via NVOS54 and then |
