lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <322e1b57-394a-4445-9a34-a46183d3aa45@nvidia.com>
Date: Wed, 3 Sep 2025 12:45:04 -0700
From: John Hubbard <jhubbard@...dia.com>
To: Alistair Popple <apopple@...dia.com>
Cc: dri-devel@...ts.freedesktop.org, dakr@...nel.org, acourbot@...dia.com,
 Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
 Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
 Björn Roy Baron <bjorn3_gh@...tonmail.com>,
 Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>,
 Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
 David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
 Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
 Joel Fernandes <joelagnelf@...dia.com>, Timur Tabi <ttabi@...dia.com>,
 linux-kernel@...r.kernel.org, nouveau@...ts.freedesktop.org
Subject: Re: [PATCH 01/10] gpu: nova-core: Set correct DMA mask

On 9/1/25 4:55 PM, Alistair Popple wrote:
> On 2025-08-30 at 09:55 +1000, John Hubbard <jhubbard@...dia.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".

> 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".

> 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.



thanks,
-- 
John Hubbard


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ