From: Vladislav Zaharov <vladazaharova2018@gmail.com>
To: dakr@kernel.org, acourbot@nvidia.com
Cc: aliceryhl@google.com, ttabi@nvidia.com, nova-gpu@lists.linux.dev,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org,
Vladislav Zaharov <vladazaharova2018@gmail.com>
Subject: [PATCH 0/2] gpu: nova-core: retain the GSP-RM log buffers
Date: Wed, 12 Aug 2026 18:37:50 +0700 [thread overview]
Message-ID: <20260812113752.532537-1-vladazaharova2018@gmail.com> (raw)
The GSP-RM log buffers are exposed through debugfs, but the entries are
owned by the Gpu that probe() builds, and the buffers themselves are DMA
allocations that cannot outlive the device. They are therefore gone as
soon as the GPU is unbound, and in particular as soon as probe() fails -
which is the case todo.rst singled out ("even after failure to probe the
driver"), and the one where a GSP log is worth having.
Patch 1 adds CONFIG_NOVA_CORE_KEEP_GSP_LOGS: when the log buffers are
dropped, whatever the GSP wrote is copied into memory owned by the
module and exposed under a "retained" directory until the module is
unloaded. Patch 2 drops the now completed task from todo.rst.
nouveau has the same feature behind its keep_gsp_logging module
parameter. It recreates the entries under the name of the GPU that just
went away, which collides with that GPU coming back; the "retained"
directory here avoids that.
Tested on a GB203 (RTX 5080), which the driver probes successfully:
- after an unbind, retained/<BDF>/{loginit,logintr,logrm} hold the
contents the live entries had;
- with a failure injected after the GSP has booted, probe() fails and
the logs of that attempt are still readable;
- binding the GPU again does not disturb the copies, and unbinding it
a second time replaces them;
- the copies are released on module unload, with nothing left behind;
- with the option off, the entries disappear on unbind as before.
Built and checked with CLIPPY=1 and rustfmtcheck for both settings of
the new option.
The testing was done on top of e6c2c6265521 ("rust: firmware: add
request_into_buf()"), that is, before the TLV firmware series, because
the nvidia/*/gsp/*.tlv images are not in linux-firmware yet and the
driver therefore cannot load firmware at the current tip. The series
applies and builds unchanged on top of drm-rust-next.
Vladislav Zaharov (2):
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/Kconfig | 18 ++++
drivers/gpu/nova-core/gsp.rs | 146 +++++++++++++++++++++++++++
drivers/gpu/nova-core/nova_core.rs | 19 ++++
4 files changed, 183 insertions(+), 12 deletions(-)
--
2.55.0
next reply other threads:[~2026-08-12 11:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 11:37 Vladislav Zaharov [this message]
2026-08-12 11:37 ` [PATCH 1/2] gpu: nova-core: gsp: retain the GSP-RM log buffers after unbind Vladislav Zaharov
2026-08-12 22:41 ` John Hubbard
2026-08-12 23:15 ` Danilo Krummrich
2026-08-13 0:00 ` John Hubbard
2026-08-13 16:29 ` Timur Tabi
2026-08-13 19:30 ` John Hubbard
2026-08-13 20:00 ` Danilo Krummrich
2026-08-13 20:21 ` John Hubbard
2026-08-12 23:43 ` Danilo Krummrich
2026-08-12 11:37 ` [PATCH 2/2] Documentation: nova: remove completed GSP log buffer task Vladislav Zaharov
2026-08-12 15:54 ` [PATCH 0/2] gpu: nova-core: retain the GSP-RM log buffers Danilo Krummrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260812113752.532537-1-vladazaharova2018@gmail.com \
--to=vladazaharova2018@gmail.com \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=ttabi@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox