diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-23 03:26:38 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-23 03:26:38 -0400 |
| commit | a1d27eef42b8232e309eca7ecad5141026ee07db (patch) | |
| tree | de76f756b9fb6299510178c93f4248e12f42826d /kernel/gsp_rm_emulation.c | |
| parent | 1cd0671aae148221cde0cf1c90853926e1dde5c3 (diff) | |
| download | open-iov-a1d27eef42b8232e309eca7ecad5141026ee07db.tar.gz open-iov-a1d27eef42b8232e309eca7ecad5141026ee07db.zip | |
r523 the BINAPI-07 oracle reply parse: an alloc with paramsSize=0 echoes the 32-byte request header (hObject at +8, status at +16) - the backend alloc itself succeeded (rpc_result=0) in r522
Diffstat (limited to 'kernel/gsp_rm_emulation.c')
| -rw-r--r-- | kernel/gsp_rm_emulation.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/kernel/gsp_rm_emulation.c b/kernel/gsp_rm_emulation.c index 6996469..2054086 100644 --- a/kernel/gsp_rm_emulation.c +++ b/kernel/gsp_rm_emulation.c @@ -3097,14 +3097,21 @@ static bool gsp_rm_ctrl_forward(struct gsp_emu_context *ctx, ret = gsp_phys_backend_rpc(GSPRM_RPC_FUNC_GSP_RM_ALLOC, areq, 32, &arsp, &arsp_len, 500); kfree(areq); - if (!ret && arsp && arsp_len >= 36) { + if (!ret && arsp && arsp_len >= 32) { + /* + * An alloc with paramsSize=0 echoes the 32-byte + * rpc_gsp_rm_alloc_v03_00: hObject (the chosen + * handle) at +8, status at +16. (The rm-call ladder + * reads +32 for ROOT allocs, whose params carry the + * handle; with no params the reply is 32 B.) + */ memcpy(&ast, (u8 *)arsp + 16, 4); - memcpy(&ah, (u8 *)arsp + 32, 4); + memcpy(&ah, (u8 *)arsp + 8, 4); } kfree(arsp); nv_vgpu_info(ctx->vgpu, - "vgsp-rm: BINAPI-EXPERIMENT backend alloc class=0x2081 (ret=%d): status=0x%x hObject=0x%x", - ret, ast, ah); + "vgsp-rm: BINAPI-EXPERIMENT backend alloc class=0x2081 (ret=%d len=%u): status=0x%x hObject=0x%x", + ret, arsp_len, ast, ah); if (ret || ast != 0 || !ah) goto fallback; gsp_rm_binapi07_be_object = ah; |
