From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "haider" <soka11223344k@gmail.com>
Cc: <dakr@kernel.org>, <apopple@nvidia.com>, <ecourtney@nvidia.com>,
<jhubbard@nvidia.com>, <aliceryhl@google.com>, <gary@garyguo.net>,
<airlied@gmail.com>, <simona@ffwll.ch>,
<nova-gpu@lists.linux.dev>, <dri-devel@lists.freedesktop.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] gpu: nova-core: gsp: zero-pad command queue elements
Date: Tue, 13 Oct 2026 09:29:35 +0900 [thread overview]
Message-ID: <DM3AAU5883WA.2GX2D1DA6IY34@nvidia.com> (raw)
In-Reply-To: <20261011145105.20829-1-soka11223344k@gmail.com>
On Sun Oct 11, 2026 at 11:51 PM JST, haider wrote:
> GSP-RM checksums a command queue element by XORing it in 64-bit words,
> so for an element whose size is not a multiple of 8 it also reads up to
> 7 bytes past its end, and expects them to be zero: its _checkSum32()
> "assumes that the data is padded out with zeros to the next 8-byte
> alignment". NVIDIA's kernel driver zeroes these bytes before computing
> the checksum, and nouveau builds each element in a zeroed buffer.
>
> allocate_command() hands out the queue slots as they are, so these bytes
> still hold whatever an earlier, longer element left there. Once the
> queue has wrapped, a command of such a size can then fail GSP-RM's
> checksum: GSP-RM never answers it, and soon stops answering at all.
>
> Nova does not send enough commands for the queue to wrap yet, as it is
> zeroed at probe, but this will break as soon as it does.
>
> Clear each element and its padding before writing it.
The checksum code is imminently going away with the switch to the r000
firmware version, so I don't think there is much value in fixing it now.
>
> Fixes: 75f6b1de8133 ("gpu: nova-core: gsp: Add GSP command queue bindings and handling")
> Assisted-by: LLM
> Signed-off-by: haider <soka11223344k@gmail.com>
For future contributions, please use as real name as per the
contribution guidelines [1].
Also as a general comment, both the commit log and code comment are
unsufferably long and tedious. When working with a LLM, please
edit/rewrite its output to something concise and to the point.
[1] https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html#developer-s-certificate-of-origin-1-1
prev parent reply other threads:[~2026-10-13 0:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 14:51 haider
2026-10-13 0:29 ` Alexandre Courbot [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=DM3AAU5883WA.2GX2D1DA6IY34@nvidia.com \
--to=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=simona@ffwll.ch \
--cc=soka11223344k@gmail.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®