From: John Hubbard <jhubbard@nvidia.com>
To: airlied@redhat.com, Lyude Paul <lyude@redhat.com>,
Danilo Krummrich <dakr@kernel.org>,
Alexandre Courbot <acourbot@nvidia.com>
Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
nova-gpu@lists.linux.dev
Subject: Re: [PATCH v3 2/2] nova-core: only bind to GPUs when explicitly requested
Date: Tue, 24 Nov 2026 18:24:06 -0800 [thread overview]
Message-ID: <95e63e66-1143-4c81-9206-68149ce00071@nvidia.com> (raw)
In-Reply-To: <20261124-nova-nouveau-gsp-v3-2-e1440479ded6@redhat.com>
On 11/23/26 9:50 PM, Dave Airlie via B4 Relay wrote:
> From: Dave Airlie <airlied@redhat.com>
...
> diff --git a/drivers/gpu/nova-core/driver.rs b/drivers/gpu/nova-core/driver.rs
> index d6bc972d47c7..e89967ef0cd5 100644
> --- a/drivers/gpu/nova-core/driver.rs
> +++ b/drivers/gpu/nova-core/driver.rs
> @@ -105,6 +105,10 @@ fn probe<'bound>(
> dev_dbg!(pdev, "Probe Nova Core GPU driver.\n");
>
> try_pin_init!(NovaCore {
> + _: {
> + crate::NovaCoreModule::check_bind_allowed(pdev)?;
This runs before Nova has read the Chipset. The PCI ID table matches
every NVIDIA VGA and 3D controller, so pre-Turing GPUs go through this
check too. That leads to the problem below, in the dev_info!() message.
> + },
> +
> _: {
> pdev.enable_device_mem()?;
> pdev.set_master();
> diff --git a/drivers/gpu/nova-core/nova_core.rs b/drivers/gpu/nova-core/nova_core.rs
> index 84f777844592..483e5c1d427b 100644
> --- a/drivers/gpu/nova-core/nova_core.rs
> +++ b/drivers/gpu/nova-core/nova_core.rs
> @@ -68,6 +68,25 @@ pub(crate) fn debugfs_data<'a>(_dev: &'a device::Device<device::Bound>) -> &'a D
> }
> }
>
> +impl NovaCoreModule {
> + /// Check whether nova-core is allowed to bind to GPUs.
> + ///
> + /// Binding needs to be requested explicitly, either through the
> + /// NOVA_CORE_BIND_GSP Kconfig option or the `bind_gsp` module parameter.
> + /// Otherwise, NVIDIA GPUs are left to other drivers, such as nouveau.
> + pub(crate) fn check_bind_allowed(pdev: &pci::Device<device::Core<'_>>) -> Result {
> + if crate::module_parameters::bind_gsp.value() {
> + return Ok(());
> + }
> +
> + dev_info!(
> + pdev,
> + "Not binding to GPU; enable with CONFIG_NOVA_CORE_BIND_GSP=y or nova-core.bind_gsp=1\n"
This advice is wrong for pre-Turing GPUs. In other words, if someone boots
with bind_gsp *not* set on pre-Turing, they will see the above dmesg
output, but setting bind_gsp will not cause anything to start working,
because Nova doesn't support those GPUs.
Maybe the simplest fix is to change the print message to make a much
narrower claim. Something like this, in the same form as nouveau's
message in patch 1:
"Not binding to GPU (bind_gsp=0)\n"
Doing the check later, after getting the Chipset/ChipID, would also avoid
the problem, and it is the order that nouveau uses in patch 1. However,
I'm not sure it's worth the extra code. The device has to be enabled and
BAR0 mapped before the Chipset can be read, so a declined probe has to
disable the device again. And rust/kernel/pci.rs has no
pci_disable_device() wrapper yet.
thanks,
--
John Hubbard
next prev parent reply other threads:[~2026-11-25 2:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 5:50 [PATCH v3 0/2] nova/nouveau: add configs/module options to control binding behaviour (v2) Dave Airlie via B4 Relay
2026-11-24 5:50 ` [PATCH v3 1/2] drm/nouveau: add option to leave GSP-capable GPUs to other drivers Dave Airlie via B4 Relay
2026-11-25 3:21 ` John Hubbard
2026-11-24 5:50 ` [PATCH v3 2/2] nova-core: only bind to GPUs when explicitly requested Dave Airlie via B4 Relay
2026-11-24 11:59 ` Danilo Krummrich
2026-11-24 14:25 ` Gary Guo
2026-11-25 2:24 ` John Hubbard [this message]
2026-11-24 14:27 ` [PATCH v3 0/2] nova/nouveau: add configs/module options to control binding behaviour (v2) Gary Guo
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=95e63e66-1143-4c81-9206-68149ce00071@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=acourbot@nvidia.com \
--cc=airlied@redhat.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.org \
--cc=nova-gpu@lists.linux.dev \
/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