From 2c001647e47455544739fc8f4e841c6b93cbe32f Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Wed, 30 Sep 2026 00:06:42 -0400 Subject: gsprm: reply-latency logging + param dump cap; guest-diag: CDT_PAUSE, watcher reaping, wider CE stream window --- kernel/gsp_emulation.c | 3 +++ kernel/gsp_rm_emulation.c | 12 +++++++++++- kernel/main.c | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) (limited to 'kernel') diff --git a/kernel/gsp_emulation.c b/kernel/gsp_emulation.c index 833ce42..4d8642a 100644 --- a/kernel/gsp_emulation.c +++ b/kernel/gsp_emulation.c @@ -302,6 +302,9 @@ static void gsp_emu_poll_boot(struct gsp_emu_context *ctx) gsp_emu_shadow_write32(ctx, GSP_EMU_REG_FALCON_DEBUGINFO, 0); nv_vgpu_info(ctx->vgpu, "GSP-BOOT: cleared CrashCat wayfinder (was 0x%x)", wfl0); + } else if (wfl0) { + pr_info_ratelimited("GSP-BOOT: DEBUGINFO nonzero (0x%x), not a wayfinder\n", + wfl0); } } diff --git a/kernel/gsp_rm_emulation.c b/kernel/gsp_rm_emulation.c index d1d87e9..777c63c 100644 --- a/kernel/gsp_rm_emulation.c +++ b/kernel/gsp_rm_emulation.c @@ -2545,6 +2545,7 @@ static void gsp_rm_handle_rm_control(struct gsp_emu_context *ctx, u8 *reply; u32 out_status = 0; u32 out_params_size = 0; + u64 t0 = ktime_get_ns(); memcpy(&req, req_data, GSP_RM_CTRL_HDR_SIZE); @@ -2730,7 +2731,7 @@ static void gsp_rm_handle_rm_control(struct gsp_emu_context *ctx, /* Dump small request params so mapping/alloc controls that * carry PAs can be identified (rate-limited). */ if (req.paramsSize && req.paramsSize <= 96 && - rm->ctrl_param_dumps < 60) { + rm->ctrl_param_dumps < 400) { rm->ctrl_param_dumps++; nv_vgpu_info(ctx->vgpu, "GSPRM: ctrl 0x%x params[0..%u]=%*phN", @@ -2765,6 +2766,15 @@ static void gsp_rm_handle_rm_control(struct gsp_emu_context *ctx, memcpy(reply + 16, &out_params_size, 4); memcpy(reply + 20, &req.flags, 4); + { + u64 dt_us = div_u64(ktime_get_ns() - t0, 1000); + + nv_vgpu_info(ctx->vgpu, + "GSPRM: RM_CONTROL reply cmd=0x%x hClient=0x%x hObject=0x%x in=%u out=%u status=0x%x us=%llu", + req.cmd, req.hClient, req.hObject, req.paramsSize, + out_params_size, out_status, dt_us); + } + if (gsp_rm_send(ctx, GSPRM_RPC_FUNC_GSP_RM_CONTROL, sequence, 0, reply, GSP_RM_CTRL_HDR_SIZE + out_params_size)) nv_vgpu_err(ctx->vgpu, "GSPRM: RM_CONTROL reply send failed cmd=0x%x", diff --git a/kernel/main.c b/kernel/main.c index 590d956..f427828 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -772,7 +772,7 @@ static ssize_t nv_vgpu_vfio_dev_write(struct vfio_device *vdev, const char __use struct nv_vgpu_device *vgpu = container_of(vdev, struct nv_vgpu_device, vfio_dev); loff_t pos = *ppos; - pr_info("gsp-resman-vfio: VFIO device write count=%zu pos=%lld (0x%llx)\n", count, pos, pos); + pr_info_ratelimited("gsp-resman-vfio: VFIO device write count=%zu pos=%lld (0x%llx)\n", count, pos, pos); /* Config space region - route through the per-register filter so the * guest can only modify writable registers (not vendor/device IDs, -- cgit v1.2.3