From: "Gary Guo" <gary@garyguo.net>
To: "Dave Airlie" <airlied@gmail.com>, "Gary Guo" <gary@garyguo.net>
Cc: <airlied@redhat.com>, "Lyude Paul" <lyude@redhat.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
<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: Thu, 03 Dec 2026 12:31:43 +0000 [thread overview]
Message-ID: <DNB3LISLMKHJ.1ZTBLQHMGS28O@garyguo.net> (raw)
In-Reply-To: <CAPM=9ty4D=Puo4C5-B9fDtGNSu52h-ZUQgaiNBcw0LeXxfh6Dg@mail.gmail.com>
On Thu Dec 3, 2026 at 3:51 AM GMT, Dave Airlie wrote:
> On Wed, 25 Nov 2026 at 00:26, Gary Guo <gary@garyguo.net> wrote:
>>
>> On Tue Nov 24, 2026 at 5:50 AM GMT, Dave Airlie via B4 Relay wrote:
>> > From: Dave Airlie <airlied@redhat.com>
>> >
>> > nova-core currently binds to every NVIDIA GPU it supports
>> > (GSP-capable, Turing and later GPUs), competing with nouveau for the
>> > same devices.
>> >
>> > Add the NOVA_CORE_BIND_GSP Kconfig option (default n) and a bind_gsp
>> > module parameter, defaulting to the Kconfig value and able to override
>> > it in both directions. Unless one of them requests binding, probe()
>> > rejects the GPU with -ENODEV and leaves the device to other drivers,
>> > such as nouveau. The PCI driver still registers, so module autoloading
>> > via modalias keeps working when binding is disabled.
>> >
>> > Signed-off-by: Dave Airlie <airlied@redhat.com>
>> > ---
>> > drivers/gpu/nova-core/Kconfig | 21 +++++++++++++++++++++
>> > drivers/gpu/nova-core/driver.rs | 4 ++++
>> > drivers/gpu/nova-core/nova_core.rs | 23 +++++++++++++++++++++++
>> > 3 files changed, 48 insertions(+)
>> >
>> > 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(());
>> > + }
>>
>> This will reject binding via sysfs, which I think should still be allowed
>> despite CONFIG_NOVA_CORE_BIND_GSP. I wonder if we can support such cases just by
>> setting ID table to override_only if the config option is set?
>>
>> If module parameter is set, then we can pci_add_dynid to add a match without
>> override_only being set.
>>
>
> While I think it "should" be allowed, it's not a simple case to just make work,
>
> the current override stuff is vfio only so we'd need to extend the PCI
> override, which I think if this is something we want people can do it
> later, it's over complicating this series, whose main goal is stop
> distros doing stupid things, not enable users to do more stupid
> things.
>
Fair. I mostly think this as a useful thing for testing. Danilo suggested to me
in testing environment it could simply be achieved by rmmod + modprobe again but
with bind_gsp set, so no objection from me.
Best,
Gary
next prev parent reply other threads:[~2026-12-03 12:31 UTC|newest]
Thread overview: 14+ 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-25 4:43 ` M Henning
2026-11-25 15:41 ` Ville Syrjälä
2026-11-26 0:33 ` Danilo Krummrich
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-12-03 3:51 ` Dave Airlie
2026-12-03 12:31 ` Gary Guo [this message]
2026-12-03 12:38 ` Danilo Krummrich
2026-11-25 2:24 ` John Hubbard
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=DNB3LISLMKHJ.1ZTBLQHMGS28O@garyguo.net \
--to=gary@garyguo.net \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.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