From: Alistair Popple <apopple@nvidia.com>
To: John Hubbard <jhubbard@nvidia.com>
Cc: dri-devel@lists.freedesktop.org, dakr@kernel.org,
acourbot@nvidia.com, "Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Joel Fernandes" <joelagnelf@nvidia.com>,
"Timur Tabi" <ttabi@nvidia.com>,
linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org
Subject: Re: [PATCH 01/10] gpu: nova-core: Set correct DMA mask
Date: Thu, 4 Sep 2025 08:03:10 +1000 [thread overview]
Message-ID: <3qlp36gvncccffxk3dvsh63ynydk4zqekzikv4pdzsnpgsy2wa@tqwpcc7mga4r> (raw)
In-Reply-To: <322e1b57-394a-4445-9a34-a46183d3aa45@nvidia.com>
On 2025-09-04 at 05:45 +1000, John Hubbard <jhubbard@nvidia.com> wrote...
> On 9/1/25 4:55 PM, Alistair Popple wrote:
> > On 2025-08-30 at 09:55 +1000, John Hubbard <jhubbard@nvidia.com> wrote...
> > > On 8/27/25 1:19 AM, Alistair Popple wrote:
> ...
> > > > + // SAFETY: No DMA allocations have been made yet
> > > > + unsafe { pdev.dma_set_mask_and_coherent(DmaMask::new::<48>())? };
> > >
> > > Eventually, should be 52 bits wide, rather than 48. Or so I believe from
> > > looking at various drivers, including Nouveau (which uses 52-bit for
> > > Blackwell) and mlx* (which use a 64-bit mask).
> > >
> > > However, it works for the current series, because this series only supports
> > > Ampere GPUs, and 48 bits suffices for those.
> >
> > Actually based on both Nouveau and our internal docs this should be 47-bits. I
>
> Yes. Which is why I wrote "48 bits suffices".
Sufficies most of the time, but is wrong none the less! Knowing my luck I would
run into just such a unicorn system where this would cause problems :-) So
thanks for looking at this.
> > suspect I just chose 48 during initial bring-up because that's what most CPUs
> > support but neglected to add the TODO to actually go and check this. So will fix
> > for v2.
> >
> > > So, you could leave this patch as-is, and I'll change 48 --> 52 in the
> > > upcoming Hopper/Blackwell series. Or you can change it now.
> >
> > We can't of course just change this to 52 bits because this needs to reflect
> > what the GPU HW supports. So ideally this needs to come from the HAL. I left
>
> I should have been more precise. I meant, "use 52 bits, via HAL, just
> like Nouveau does".
Aha. I wasn't sure so thanks for the clarification.
> > this hard-coded because in the short-term leaving it as 47 bits even for
> > Blackwell won't cause any issues. It may force usage of an IOMMU to address
> > physical addresses greater than 47-bits when it otherwise wouldn't for
> > Hopper/Blackwell (it would always have to for Ampere/Turing), but short-term I
> > doubt many systems actually have physical memory above 47-bits anyway.
> >
> > In other words you could leave this as 47 bits in the upcoming Hopper/Blackwell
> > series or use the HAL we have come up with (if that is available) to obtain the
> > optimal value.
>
> Yes. I'm planning to match Nouveau's HAL approach for this, in the
> upcoming Hopper/Blackwell series.
Excellent, that sounds perfect.
>
> thanks,
> --
> John Hubbard
>
next prev parent reply other threads:[~2025-09-03 22:03 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 8:19 [PATCH 00/10] gpu: nova-core: Boot GSP to RISC-V active Alistair Popple
2025-08-27 8:19 ` [PATCH 01/10] gpu: nova-core: Set correct DMA mask Alistair Popple
2025-08-29 23:55 ` John Hubbard
2025-09-01 23:55 ` Alistair Popple
2025-09-03 19:45 ` John Hubbard
2025-09-03 22:03 ` Alistair Popple [this message]
2025-08-27 8:19 ` [PATCH 02/10] gpu: nova-core: Create initial GspSharedMemObjects Alistair Popple
2025-08-27 8:20 ` [PATCH 03/10] gpu: nova-core: gsp: Create wpr metadata Alistair Popple
2025-09-01 7:46 ` Alexandre Courbot
2025-09-03 8:57 ` Alistair Popple
2025-09-03 12:51 ` Alexandre Courbot
2025-09-03 13:10 ` Alexandre Courbot
2025-08-27 8:20 ` [PATCH 04/10] gpu: nova-core: Add a slice-buffer (sbuffer) datastructure Alistair Popple
2025-08-27 8:20 ` [PATCH 05/10] gpu: nova-core: gsp: Add GSP command queue handling Alistair Popple
2025-08-27 20:35 ` John Hubbard
2025-08-27 23:42 ` Alistair Popple
2025-08-27 8:20 ` [PATCH 06/10] gpu: nova-core: gsp: Create rmargs Alistair Popple
2025-08-27 8:20 ` [PATCH 07/10] gpu: nova-core: gsp: Create RM registry and sysinfo commands Alistair Popple
2025-08-29 6:02 ` Alistair Popple
2025-08-27 8:20 ` [PATCH 08/10] gpu: nova-core: falcon: Add support to check if RISC-V is active Alistair Popple
2025-08-29 18:48 ` Timur Tabi
2025-09-02 0:08 ` Alistair Popple
2025-08-27 8:20 ` [PATCH 09/10] gpu: nova-core: falcon: Add support to write firmware version Alistair Popple
2025-08-27 8:20 ` [PATCH 10/10] gpu: nova-core: gsp: Boot GSP Alistair Popple
2025-08-28 8:37 ` [PATCH 00/10] gpu: nova-core: Boot GSP to RISC-V active Miguel Ojeda
2025-08-29 3:03 ` Alexandre Courbot
2025-08-29 7:40 ` Danilo Krummrich
[not found] ` <CANiq72n5N3yHU_vxjiHk=TeJ0ouW1+xLDw43hcOVv6qSPFa=sg@mail.gmail.com>
2025-08-29 13:47 ` 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=3qlp36gvncccffxk3dvsh63ynydk4zqekzikv4pdzsnpgsy2wa@tqwpcc7mga4r \
--to=apopple@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=joelagnelf@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=ojeda@kernel.org \
--cc=simona@ffwll.ch \
--cc=tmgross@umich.edu \
--cc=ttabi@nvidia.com \
--cc=tzimmermann@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).