The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Alistair Popple <apopple@nvidia.com>
To: John Hubbard <jhubbard@nvidia.com>
Cc: Danilo Krummrich <dakr@kernel.org>,
	 M Henning <mhenning@darkrefraction.com>,
	nova-gpu <nova-gpu@lists.linux.dev>,
	 Alice Ryhl <aliceryhl@google.com>,
	David Airlie <airlied@gmail.com>,
	 Alexandre Courbot <acourbot@nvidia.com>,
	Benno Lossin <lossin@kernel.org>, Gary Guo <gary@garyguo.net>,
	 Eliot Courtney <ecourtney@nvidia.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	 rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v4 3/7] drm: nova: Add chipid enum to nova-drm UAPI
Date: Wed, 26 Aug 2026 11:27:12 +1000	[thread overview]
Message-ID: <ao48Kz_vDm8Ogg9n@nvdebian.thelocal> (raw)
In-Reply-To: <ecb0dc71-84f6-4a0a-8bcd-d38b194630d3@nvidia.com>

On 2026-08-26 at 07:13 +1000, John Hubbard <jhubbard@nvidia.com> wrote...
> On 8/25/26 1:53 PM, Danilo Krummrich wrote:
> > On Tue Aug 25, 2026 at 9:13 AM CEST, Alistair Popple wrote:
> ...>> For example if someone plugs a shiny new card with a different chip_id
> >> register layout into a machine running an older kernel they could get an
> >> incorrect arch which would be confusing. Users would get upset if for example
> >> ShinyNewCard got reported as being Turing say.
> > 
> > If the kernel can't deal with a chip it should never succeed probing and never
> > expose any information to userspace in the first place.
> 
> Agreed.
> 
> We had also some discussion about this point during the BOOT0/BOOT42
> change-over. And we arrived at that same conclusion back then: don't
> let PCI probe succeed on an unknown new chip.

Ok. I thought maybe with GSP providing a lot of the HW abstraction we might have
been going somewhat in that direction. It's something I've seen done well in the
past on other products.

> > 
> > nova-core does enforce this already; if a chipid can't be matched against an
> > architecture it won't compile, and if the chipid is not known by nova-core it
> > will fail to probe.
> > 
> > Note that nova-core binds by vendor + class, not specific PCI device IDs, so the
> > chipset check is our only gate against unknown hardware.
> > 
> > If we'd hypothetically remove that gate and just allow trying to probe unknown
> > hardware with the boot sequence of just assuming some default with the latest
> > supported architecture, it would potentially be an even worse user experience,
> > where instead of a clear rejection of the hardware a user might experience
> > security/stability issues.

With careful design it can work, but you're right that probably isn't something
we're doing or want here and would make the experience worse.

> >> So I think it makes sense to keep this decoding in user-space regardless of
> >> whether that's exposed via documented opaque chip IDs and lookup tables for
> >> arch/implementation or by a commitment to keep the chip ID register layout the
> >> same.
> > 
> > I still don't see much value in letting userspace decode this again, nor do I
> > think lookup tables are necessary.
> > 
> > If the driver succeeds to probe for a device we already did decode things, so
> > there's no need for userspace to do it again or know about this.
> 
> Also agreed here. It's hard to see any advantage in decoding in both
> user space and kernel.

Sure. Two questions:

1) Do we also need to provide the decoded implementation value?
2) If we provide the decoded values why do we need to expose the chip-id at all?

Thanks.

 - Alistair

> thanks,
> -- 
> John Hubbard
> 

  reply	other threads:[~2026-08-26  1:27 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11  5:06 [PATCH v4 0/7] gpu: nova: Export parameters from nova-core to nova-drm Alistair Popple
2026-08-11  5:06 ` [PATCH v4 1/7] gpu: nova-core: Add public driver API to nova-core Alistair Popple
2026-08-11  5:06 ` [PATCH v4 2/7] drm: nova: Add DRM registration data Alistair Popple
2026-08-11  5:06 ` [PATCH v4 3/7] drm: nova: Add chipid enum to nova-drm UAPI Alistair Popple
2026-08-24 14:49   ` M Henning
2026-08-24 19:24     ` Danilo Krummrich
2026-08-25  7:13       ` Alistair Popple
2026-08-25 12:03         ` Alistair Popple
2026-08-25 20:53           ` Danilo Krummrich
2026-08-25 20:53         ` Danilo Krummrich
2026-08-25 21:13           ` John Hubbard
2026-08-26  1:27             ` Alistair Popple [this message]
2026-08-26  1:41               ` John Hubbard
2026-08-26  1:49                 ` Alistair Popple
2026-08-11  5:06 ` [PATCH v4 4/7] drm: nova: Add a GPU info ioctl Alistair Popple
2026-08-17 20:18   ` Danilo Krummrich
2026-08-21  5:10     ` Alistair Popple
2026-08-24 19:10       ` Danilo Krummrich
2026-08-25  7:32         ` Alistair Popple
2026-08-25 22:37           ` Danilo Krummrich
2026-08-24 19:34   ` Danilo Krummrich
2026-08-24 20:04     ` John Hubbard
2026-08-25  6:40       ` Alistair Popple
2026-08-11  5:06 ` [PATCH v4 5/7] drm: nova: Add usable VRAM size to " Alistair Popple
2026-08-11  5:06 ` [PATCH v4 6/7] drm: nova: Use nova-core to read VRAM_BAR_SIZE parameter Alistair Popple
2026-08-17 20:11   ` Danilo Krummrich
2026-08-21  5:13     ` Alistair Popple
2026-08-11  5:06 ` [PATCH v4 7/7] drm: nova: Expose a render node Alistair Popple

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=ao48Kz_vDm8Ogg9n@nvdebian.thelocal \
    --to=apopple@nvidia.com \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.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=lossin@kernel.org \
    --cc=mhenning@darkrefraction.com \
    --cc=nova-gpu@lists.linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    /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