From: "Eliot Courtney" <ecourtney@nvidia.com>
To: "Alexandre Courbot" <acourbot@nvidia.com>,
"Eliot Courtney" <ecourtney@nvidia.com>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"John Hubbard" <jhubbard@nvidia.com>,
"Alistair Popple" <apopple@nvidia.com>,
"Timur Tabi" <ttabi@nvidia.com>, <nova-gpu@lists.linux.dev>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
<rust-for-linux@vger.kernel.org>,
"dri-devel" <dri-devel-bounces@lists.freedesktop.org>
Subject: Re: [PATCH v6 7/7] gpu: nova-core: run Booter Unloader and FWSEC-SB upon unbinding
Date: Thu, 28 May 2026 10:50:49 +0900 [thread overview]
Message-ID: <DITXLUSX8J8Q.3OXYXGUBILQB2@nvidia.com> (raw)
In-Reply-To: <DITIJ7IIAK7L.2PKIBC52OS7AG@nvidia.com>
On Wed May 27, 2026 at 11:02 PM JST, Alexandre Courbot wrote:
> On Fri May 22, 2026 at 3:59 PM JST, Eliot Courtney wrote:
>> On Thu May 21, 2026 at 10:50 PM JST, Alexandre Courbot wrote:
>>> When probing the driver, the FWSEC-FRTS firmware creates a WPR2 secure
>>> memory region to store the GSP firmware, and the Booter Loader loads and
>>> starts that firmware into the GSP, making it run in RISC-V mode.
>>>
>>> These operations need to be reverted upon unloading, particularly the
>>> WPR2 secure region creation, as its presence prevents the driver from
>>> subsequently probing.
>>>
>>> Thus, prepare the Booter Unloader and FWSEC-SB firmwares when booting
>>> the GSP, so they can be executed at unbind time to put the GPU into a
>>> state where it can be probed again.
>>>
>>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
>>> ---
>>
>> After seeing the bundle moved outwards, I realised that it has the same
>> issue that SysmemFlush does, i.e. if probe fails it does not reset the
>> GSP. A lot of the time during development I will break things badly
>> enough that probe fails, so it would be nice if this is supported. OTOH,
>> this gets the probe suceed and unload case working which is important
>> and this is a definite improvement, so for this version and the previous
>> version of the patch:
>>
>> Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
>>
>> I also had a brief go at making this work on Drop, here is the diff on
>> top of this series. I can send this as a follow up if you would like
>> after cleaning it up, or lmk wdyt:
>
> This is clearly better. It guarantees that the unload sequence is run
> when the `Gpu` is dropped, while preserving its one-shot nature. Also,
> no `Cell` and no awkward output parameter to `Gpu::new`.
>
> The only blind spot remaining would be to also cover the case where a
> failure occurs during `Gsp::boot`, but that's for `Gsp::boot` to handle
> itself imho.
>
> Would you be ok if I folded this into this patch for v7, with your
> `Co-developed-by` and `Signed-off-by`? Then I'll also try to tackle the
> `Gsp::boot` failure scenario using a drop wrapper or something similar.
Yerp that is fine of course. For Gsp::boot it should handle unwinding if
there is a failure but I agree it is orthogonal to this case, so
addressing in a follow-up SGTM.
next prev parent reply other threads:[~2026-05-28 1:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 13:50 [PATCH v6 0/7] gpu: nova-core: run unload sequence upon unbinding Alexandre Courbot
2026-05-21 13:50 ` [PATCH v6 1/7] gpu: nova-core: remove unneeded get_gsp_info proxy function Alexandre Courbot
2026-05-21 13:50 ` [PATCH v6 2/7] gpu: nova-core: do not import firmware commands into GSP command module Alexandre Courbot
2026-05-21 13:50 ` [PATCH v6 3/7] gpu: nova-core: send UNLOADING_GUEST_DRIVER GSP command upon unloading Alexandre Courbot
2026-05-21 13:50 ` [PATCH v6 4/7] gpu: nova-core: refactor SEC2 booter loading into BooterFirmware::run() Alexandre Courbot
2026-05-21 13:50 ` [PATCH v6 5/7] gpu: nova-core: gsp: shuffle boot code a bit to keep chipset-specific parts close Alexandre Courbot
2026-05-21 13:50 ` [PATCH v6 6/7] gpu: nova-core: gsp: move chipset-specific parts of the boot process into a HAL Alexandre Courbot
2026-05-21 13:50 ` [PATCH v6 7/7] gpu: nova-core: run Booter Unloader and FWSEC-SB upon unbinding Alexandre Courbot
2026-05-22 6:59 ` Eliot Courtney
2026-05-27 14:02 ` Alexandre Courbot
2026-05-28 1:50 ` Eliot Courtney [this message]
2026-05-29 6:57 ` Alexandre Courbot
2026-05-29 6:52 ` [PATCH v6 0/7] gpu: nova-core: run unload sequence " Alexandre Courbot
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=DITXLUSX8J8Q.3OXYXGUBILQB2@nvidia.com \
--to=ecourtney@nvidia.com \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel-bounces@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--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