summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_rm_emulation.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/gsp_rm_emulation.c')
-rw-r--r--kernel/gsp_rm_emulation.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/kernel/gsp_rm_emulation.c b/kernel/gsp_rm_emulation.c
index 0a040d5..67115b3 100644
--- a/kernel/gsp_rm_emulation.c
+++ b/kernel/gsp_rm_emulation.c
@@ -1289,18 +1289,22 @@ static void gsp_rm_handle_element(struct gsp_emu_context *ctx, const u8 *elem)
* driver's rpcRecvPoll completes. */
rm->unknown_rpcs++;
if (function == 10 || function == 47) {
- /* FREE/UNLOADING: log hObject for unload-cycle debugging */
+ /* FREE/UNLOADING: log hObject + queue positions for
+ * unload-cycle debugging. driver_rp = the peer's status
+ * read pointer (swap-rx): if it lags stat_write, the
+ * driver isn't draining our replies. */
const u8 *p = elem + GSPRM_ELEM_HDR_SIZE +
sizeof(struct gsprm_rpc_header);
- u32 hc = 0, ho = 0;
+ u32 hc = 0, ho = 0, driver_rp = 0;
- if (hdr->length >= sizeof(*hdr) + 8) {
- memcpy(&hc, p, 4);
- memcpy(&ho, p + 4, 4);
- }
- nv_vgpu_info(ctx->vgpu, "GSPRM: RPC %s(%u) seq=%u hClient=0x%x hObject=0x%x cmd_read=%u",
+ if (hdr->length >= sizeof(*hdr) + 12)
+ memcpy(&ho, p + 8, 4); /* hObjectOld */
+ gsp_rm_read_buf(ctx, rm->cmd_off + 0x20,
+ &driver_rp, sizeof(driver_rp));
+ nv_vgpu_info(ctx->vgpu, "GSPRM: RPC %s(%u) seq=%u hRoot=0x%x hObjOld=0x%x cmd_read=%u stat_write=%u drv_rp=%u stat_seq=%u",
gsp_rm_rpc_name(function), function, sequence,
- hc, ho, rm->cmd_read);
+ hc, ho, rm->cmd_read, rm->stat_write,
+ driver_rp, rm->stat_seq);
} else {
nv_vgpu_info(ctx->vgpu, "GSPRM: RPC %s(%u) seq=%u len=%u -> generic SUCCESS reply (unknown #%llu)",
gsp_rm_rpc_name(function), function, sequence,