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!().

Reply via email to