Re: [PATCH v8 0/4] gpu: nova-core: retain the GSP-RM log buffers

From: John Hubbard

Date: Sat Nov 14 2026 - 21:37:23 EST


On 11/13/26 8:43 PM, Vladislav Zaharov wrote:
> The GSP-RM log buffers are exposed through debugfs, but they go away
> when the GPU is unbound, including when probe() fails, which is when
> they are most useful.
>
> Patch 1 moves the debugfs root into the module data, which also fixes
> the root being leaked when the driver registration fails. Patch 2 moves
> the log buffer code into its own file. Patch 3 adds a gsp_keep_logs
> module parameter that keeps a copy of the buffers after unbind. Patch 4
> drops the completed item from todo.rst.
>
> Changes since v7:
> - patch 3: check only gsp_keep_logs, not CONFIG_DEBUG_FS, drop the
> reserve() before replacing the copies, add RetainedLogs::push() and
> mark retained_logs() #[inline] (Danilo)
> - collect Alexandre's Reviewed-by for patches 1 and 2

Hi Vlad,

This is working nicely for me, the logs stay in the same place and
I can retrieve them even when I inject an error in the driver to
fail the probe:

root@redforge:/sys/kernel/debug/nova-core# dmesg -t |grep nova-core|grep failed
nova-core 0000:c1:00.0: probe with driver nova-core failed with error -22
nova-core 0000:c2:00.0: probe with driver nova-core failed with error -22
nova-core 0000:01:00.0: probe with driver nova-core failed with error -22
root@redforge:/sys/kernel/debug/nova-core# tree
.
├── 0000:01:00.0
│   ├── loginit
│   ├── logintr
│   └── logrm
├── 0000:c1:00.0
│   ├── loginit
│   └── logrm
└── 0000:c2:00.0
├── loginit
├── logintr
└── logrm


So for the series,

Tested-by: John Hubbard <jhubbard@xxxxxxxxxx>


thanks,
--
John Hubbard

>
> The code and the commit messages were drafted with an LLM coding
> assistant and reviewed by me. Each patch builds on its own, and the
> series was tested again on a GB203: the copies are kept after unbind
> and after a failed probe, replaced by the live buffers on the next
> bind, and nothing is kept without gsp_keep_logs.
>
> v7: https://lore.kernel.org/nova-gpu/20261113075317.934264-1-vladazaharova2018@xxxxxxxxx/
>
> Vladislav Zaharov (4):
> gpu: nova-core: move the debugfs root into the module data
> gpu: nova-core: gsp: move the log buffers into their own file
> gpu: nova-core: gsp: retain the GSP-RM log buffers after unbind
> Documentation: nova: remove completed GSP log buffer task
>
> Documentation/gpu/nova/core/todo.rst | 12 --
> drivers/gpu/nova-core/debugfs.rs | 45 ++++++
> drivers/gpu/nova-core/gsp.rs | 100 +++---------
> drivers/gpu/nova-core/gsp/logbuffer.rs | 205 +++++++++++++++++++++++++
> drivers/gpu/nova-core/nova_core.rs | 68 +++++---
> 5 files changed, 313 insertions(+), 117 deletions(-)
> create mode 100644 drivers/gpu/nova-core/debugfs.rs
> create mode 100644 drivers/gpu/nova-core/gsp/logbuffer.rs
>
>
> base-commit: 0ff9e5b9ff6736c37593cd7db89f4593ec4f8e86