From: "Eliot Courtney" <ecourtney@nvidia.com>
To: "Alexandre Courbot" <acourbot@nvidia.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Benno Lossin" <lossin@kernel.org>, "Gary Guo" <gary@garyguo.net>
Cc: "John Hubbard" <jhubbard@nvidia.com>,
"Alistair Popple" <apopple@nvidia.com>,
"Timur Tabi" <ttabi@nvidia.com>,
"Eliot Courtney" <ecourtney@nvidia.com>,
"Zhi Wang" <zhiw@nvidia.com>, <linux-kernel@vger.kernel.org>,
<nova-gpu@lists.linux.dev>, <rust-for-linux@vger.kernel.org>
Subject: Re: [PATCH 2/4] gpu: nova-core: gsp: add the GMC API header
Date: Wed, 04 Nov 2026 18:34:11 +0900 [thread overview]
Message-ID: <DMMBNSIC9LDP.1PU47ZXLI3LQ7@nvidia.com> (raw)
In-Reply-To: <20261103-r000_rebase_on_cmdq-rpc-v1-2-189f9ff3bfd2@nvidia.com>
On Tue Nov 3, 2026 at 9:02 AM JST, Alexandre Courbot wrote:
> From: John Hubbard <jhubbard@nvidia.com>
>
> The r000 firmware carries GSP-RM's boot protocol, and its newer
> interfaces in general, over the GMC (GPU Management Controller) API:
> messages that follow the queue element header with a GMC API header
> instead of an RPC header.
>
> Add the GmcApiHeader type as a newtype over the GMCAPI_HEADER binding,
> so we can define the GMC send and receive paths in the following
> patches.
>
> [ acourbot: wrap the bindings type instead of redefining it; make
> `status` return an `Option` to avoid returning a value whose semantics
> are ambiguous.]
>
> Assisted-by: LLM
> Signed-off-by: John Hubbard <jhubbard@nvidia.com>
> Co-developed-by: Alexandre Courbot <acourbot@nvidia.com>
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> ---
[...]
> +/// Header of a GMC (GPU Management Controller) API message.
> +///
> +/// In a queue element, it follows the queue element header and precedes the payload of the
> +/// command.
> +#[repr(transparent)]
> +#[expect(dead_code)]
The build breaks on rust 1.85 here, see rust-lang/rust#154377. I also
had to work around this in the NVKV series. It's broken in a few other
places so worth checking each patch on 1.85 imo
> +pub(crate) struct GmcApiHeader {
> + inner: r000_00::GMCAPI_HEADER,
> +}
> +
> +#[expect(dead_code)]
> +impl GmcApiHeader {
> + /// Creates the header of a request for `command`, sent with sequence number `sequence` and
> + /// followed by `payload_size` bytes of payload.
> + ///
> + /// `max_reply_size` is the largest reply the sender accepts, and zero for a request that
> + /// GSP-RM does not answer.
This is a bit confusing imo since we have zero reply length commands
that do get a response. I would just say that commands that do not
expect a reply or expect an reply with an empty payload (so just for the
status value) should pass zero here.
Otherwise,
Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
next prev parent reply other threads:[~2026-11-04 9:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 0:02 [PATCH 0/4] gpu: nova-core: gsp: add support for GMC messages Alexandre Courbot
2026-11-03 0:02 ` [PATCH 1/4] gpu: nova-core: gsp: fw: add the r000 bindings for the GMC API header Alexandre Courbot
2026-11-04 9:21 ` Eliot Courtney
2026-11-03 0:02 ` [PATCH 2/4] gpu: nova-core: gsp: add " Alexandre Courbot
2026-11-04 9:34 ` Eliot Courtney [this message]
2026-11-03 0:02 ` [PATCH 3/4] gpu: nova-core: gsp: cmdq: add the GMC send path Alexandre Courbot
2026-11-03 0:02 ` [PATCH 4/4] gpu: nova-core: gsp: cmdq: add the GMC receive path 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=DMMBNSIC9LDP.1PU47ZXLI3LQ7@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=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=ttabi@nvidia.com \
--cc=zhiw@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
all inboxes | Powered by JetHome®