Re: [PATCH v9 3/4] gpu: nova-core: add boot42 support for next-gen GPUs

From: Alexandre Courbot

Date: Sat Nov 15 2025 - 09:14:11 EST


On Sat Nov 15, 2025 at 10:09 AM JST, John Hubbard wrote:
> NVIDIA GPUs are moving away from using NV_PMC_BOOT_0 to contain
> architecture and revision details, and will instead use NV_PMC_BOOT_42
> in the future. NV_PMC_BOOT_0 will contain a specific set of values
> that will mean "go read NV_PMC_BOOT_42 instead".
>
> Change the selection logic in Nova so that it will claim Turing and
> later GPUs. This will work for the foreseeable future, without any
> further code changes here, because all NVIDIA GPUs are considered, from
> the oldest supported on Linux (NV04), through the future GPUs.
>
> Add some comment documentation to explain, chronologically, how boot0
> and boot42 change with the GPU eras, and how that affects the selection
> logic.
>
> Cc: Alexandre Courbot <acourbot@xxxxxxxxxx>
> Cc: Danilo Krummrich <dakr@xxxxxxxxxx>
> Cc: Timur Tabi <ttabi@xxxxxxxxxx>
> Reviewed-by: Joel Fernandes <joelagnelf@xxxxxxxxxx>
> Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>
> ---
> drivers/gpu/nova-core/gpu.rs | 41 ++++++++++++++++++++++++++++++-----
> drivers/gpu/nova-core/regs.rs | 21 +++++++++++++-----
> 2 files changed, 52 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs
> index 88a6d7af9f37..8e04628ca3d9 100644
> --- a/drivers/gpu/nova-core/gpu.rs
> +++ b/drivers/gpu/nova-core/gpu.rs
> @@ -169,6 +169,15 @@ fn from(boot0: regs::NV_PMC_BOOT_0) -> Self {
> }
> }
>
> +impl From<regs::NV_PMC_BOOT_42> for Revision {
> + fn from(boot0: regs::NV_PMC_BOOT_42) -> Self {
> + Self {
> + major: boot0.major_revision(),
> + minor: boot0.minor_revision(),
> + }
> + }
> +}

Just one nit: similarly to how we are converting the `TryFrom<BOOT_0>
for Spec` into a `TryFrom<BOOT_42>`, I think we don't need to keep
`From<BOOT_0> for Revision`. Actually we don't even want it, as using it
would mean we are relying on BOOT_0 instead of BOOT_42, which this
patchset nicely makes our only source of truth.

I'll thus remove the `From<BOOT_0>` implementation before applying.