From: sashiko-bot@kernel.org
To: "Eliot Courtney" <ecourtney@nvidia.com>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
dri-devel@lists.freedesktop.org,
"Alexandre Courbot" <acourbot@nvidia.com>,
ojeda@kernel.org
Subject: Re: [PATCH 6/6] gpu: nova-core: add NVKV GSP_INIT schemas
Date: Mon, 17 Aug 2026 13:06:43 +0000 [thread overview]
Message-ID: <20260817130643.5F9551F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260817-b4-nvkv-v1-6-b84db5e84b67@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] KVVec<RegKey> encoding does not increment NVKV element indices, causing all array elements to be sent with index 0.
--
--- Patch [6]: [PATCH 6/6] gpu: nova-core: add NVKV GSP_INIT schemas ---
commit 2486533ab3027e1001c092bef8bd2ab3fb8541bf
Author: Eliot Courtney <ecourtney@nvidia.com>
gpu: nova-core: add NVKV GSP_INIT schemas
This commit adds the first user of NVKV encode/decode, which is the request
and response for GSP init. It supports these messages for unit tests.
> diff --git a/drivers/gpu/nova-core/gsp/fw/commands.rs b/drivers/gpu/nova-core/gsp/fw/commands.rs
> index 6dc31d1bf5ae4..4de44c2dc6aa3 100644
> --- a/drivers/gpu/nova-core/gsp/fw/commands.rs
> +++ b/drivers/gpu/nova-core/gsp/fw/commands.rs
[ ... ]
> +impl Encodable for KVVec<RegKey> {
> + fn encode(&self, encoder: &mut Encoder) -> Result {
> + for regkey in self {
> + regkey.encode(encoder)?;
> + }
> + Ok(())
> + }
> +}
[Severity: High]
When iterating over the KVVec<RegKey> array in this custom Encodable
implementation, does this code need a mechanism to increment the NVKV
element index?
Because the underlying Key type appears to hardcode Index::new::<0>() for
all encodings (as Encodable::encode does not accept an index parameter), it
looks like all array elements will be encoded with index 0.
Will the GSP firmware overwrite earlier items with the last one or reject
the message due to the missing incrementing index when multiple registry
keys are present?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260817-b4-nvkv-v1-0-b84db5e84b67@nvidia.com?part=6
prev parent reply other threads:[~2026-08-17 13:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 12:56 [PATCH 0/6] gpu: nova-core: add NVKV codec Eliot Courtney
2026-08-17 12:56 ` [PATCH 1/6] rust: alloc: add Vec::push_init Eliot Courtney
2026-08-17 14:02 ` Gary Guo
2026-08-17 12:56 ` [PATCH 2/6] gpu: nova-core: add NVKV encoder Eliot Courtney
2026-08-17 13:06 ` sashiko-bot
2026-08-17 12:56 ` [PATCH 3/6] gpu: nova-core: add NVKV decoder Eliot Courtney
2026-08-17 13:06 ` sashiko-bot
2026-08-17 12:56 ` [PATCH 4/6] gpu: nova-core: add NVKV typed encoding Eliot Courtney
2026-08-17 12:56 ` [PATCH 5/6] gpu: nova-core: add NVKV typed decoding Eliot Courtney
2026-08-17 12:56 ` [PATCH 6/6] gpu: nova-core: add NVKV GSP_INIT schemas Eliot Courtney
2026-08-17 13:06 ` sashiko-bot [this message]
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=20260817130643.5F9551F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=acourbot@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ecourtney@nvidia.com \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.