From: "Danilo Krummrich" <dakr@kernel.org>
To: "Dave Airlie via B4 Relay" <devnull+airlied.redhat.com@kernel.org>
Cc: <airlied@redhat.com>, "Lyude Paul" <lyude@redhat.com>,
"Alexandre Courbot" <acourbot@nvidia.com>,
<dri-devel@lists.freedesktop.org>,
<nouveau@lists.freedesktop.org>, <nova-gpu@lists.linux.dev>
Subject: Re: [PATCH v2 3/3] nova-core: only bind to GPUs when explicitly requested
Date: Mon, 23 Nov 2026 17:53:59 +0100 [thread overview]
Message-ID: <DN2QWVWVB2FP.2DL4ZSBMYRXEC@kernel.org> (raw)
In-Reply-To: <DN2OVF03FAL6.2EKLEYINW79YO@kernel.org>
On Mon Nov 23, 2026 at 4:18 PM CET, Danilo Krummrich wrote:
> On Mon Nov 23, 2026 at 3:50 AM CET, Dave Airlie via B4 Relay wrote:
>> @@ -30,3 +30,24 @@ config NOVA_CORE_SELFTESTS
>> logs its failure and lets the probe continue.
>>
>> If unsure, say N.
>> +
>> +config NOVA_CORE_BIND_GSP
>> + bool "Make nova-core the default driver for GSP-capable GPUs"
>> + depends on NOVA_CORE
>> + default n
>> + help
>> + Make nova-core bind to all NVIDIA GPUs it supports by default.
>> +
>> + By default nova-core does not bind to any GPU and leaves NVIDIA
>> + GPUs to other drivers, such as nouveau. Say Y here, or boot with
>> + nova-core.bind_gsp=1, to make nova-core claim NVIDIA GPUs
>> + instead.
>> +
>> + nova-core is work in progress and may not be functional, so this
>> + is intended for nova developers and testers only. When enabled,
>> + nouveau must not bind to the same (GSP-capable) GPUs, i.e.
>> + CONFIG_DRM_NOUVEAU_BIND_GSP=N or nouveau.bind_gsp=0 is required.
>> + Otherwise both drivers compete for the same devices and
>> + whichever is loaded first wins.
>
> I think this is a bit unsatisfying, for the Kconfig at least it would be nice to
> avoid the possibility of being able to configure
>
> - NOVA_CORE_BIND_GSP=y && DRM_NOUVEAU_BIND_GSP=y
>
> - NOVA_CORE_BIND_GSP=n && DRM_NOUVEAU_BIND_GSP=n
>
> since I wouldn't consider them valid combinations of Kconfig options.
>
> Maybe something like this:
>
> config NVIDIA_GSP_DEFAULT_NOVA
> bool "Use Nova by default for GSP-capable NVIDIA GPUs"
> depends on DRM_NOUVEAU != n && NOVA_CORE != n
> default n
> help
> When both Nouveau and Nova are built, use Nova by default
> for GSP-capable (Turing and later) NVIDIA GPUs.
> When only one driver is built, that driver is used by
> default. Older GPUs use Nouveau.
>
> Override this default using the nouveau.bind_gsp and
> nova-core.bind_gsp module parameters.
>
> Nova is work in progress and may not be functional.
> This option is intended for developers and testers only.
>
> If unsure, say N.
>
> I think for the module parameters it is probably fine to not restrict this
> ambiguity.
>
> We've also discussed whether we can detect vGPU mode in order to pass GPUs with
> vGPU mode enabled to nova-core regardless. I think this requires an FSP request
> via EMEM (at least on Blackwell), so it should be possible to implement that
> with the existing infrastructure in nouveau as well, but I'm not convinced it's
> worth it.
>
>> + If unsure, say N.
>> diff --git a/drivers/gpu/nova-core/driver.rs b/drivers/gpu/nova-core/driver.rs
>> index d6bc972d47c7..66208a244cab 100644
>> --- a/drivers/gpu/nova-core/driver.rs
>> +++ b/drivers/gpu/nova-core/driver.rs
>> @@ -105,6 +105,19 @@ fn probe<'bound>(
>> dev_dbg!(pdev, "Probe Nova Core GPU driver.\n");
>>
>> try_pin_init!(NovaCore {
>> + // Only bind when explicitly requested through the corresponding
>> + // Kconfig option or module parameter. By default, leave NVIDIA
>> + // GPUs to other drivers, such as nouveau.
>> + _: {
>> + if !crate::module_parameters::bind_gsp.value() {
>> + dev_info!(
>> + pdev,
>> + "Not binding to GPU; make nova-core the default NVIDIA driver with CONFIG_NOVA_CORE_BIND_GSP=y or nova-core.bind_gsp=1\n"
>> + );
>> + Err(ENODEV)?;
>
> I'd prefer this to be wrapped in an associated function of NovaCoreModule, e.g.
> NovaCoreModule::check_bind_allowed(). I'd also move it before try_pin_init!().
Actually, please disregard the latter, I want to avoid the need for
pin_init_scope().
prev parent reply other threads:[~2026-11-23 16:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 2:50 [PATCH v2 0/3] nova/nouveau: add configs/module options to control binding behaviour (v2) Dave Airlie via B4 Relay
2026-11-23 2:50 ` [PATCH v2 1/3] drm/nouveau/nvkm: fix device leak on ctor failure Dave Airlie via B4 Relay
2026-11-23 3:14 ` sashiko-bot
2026-11-23 13:47 ` Danilo Krummrich
2026-11-23 2:50 ` [PATCH v2 2/3] drm/nouveau: add option to leave GSP-capable GPUs to other drivers Dave Airlie via B4 Relay
2026-11-23 2:58 ` sashiko-bot
2026-11-23 17:31 ` Timur Tabi
2026-11-23 2:50 ` [PATCH v2 3/3] nova-core: only bind to GPUs when explicitly requested Dave Airlie via B4 Relay
2026-11-23 2:55 ` sashiko-bot
2026-11-23 15:18 ` Danilo Krummrich
2026-11-23 16:53 ` Danilo Krummrich [this message]
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=DN2QWVWVB2FP.2DL4ZSBMYRXEC@kernel.org \
--to=dakr@kernel.org \
--cc=acourbot@nvidia.com \
--cc=airlied@redhat.com \
--cc=devnull+airlied.redhat.com@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