From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795452843; b=jcTeT/UNLJQ5C3yETZtF5WW+S9ejAYmMPrdWodQQyYAYFOVNQGDg3UgOGF6Bd/ziMZVs gVVU/lqIkWEZ5poS12oF8iOpSknaTwocsZe1pdxTybG9SmZPMiDNAN5XhwXZlK5322GJN HdQkS9F6GbzXCNor8KurTfwKMD56uxdDqCqrT2Pgumzu9qVLLmSju7kvqeCfLKwN3ME5a oBMxgUyZTl6PYbBt+coEL7XncxXPG8/PwK9SPCLMswYrgm4Hmx/XmT258aMdXZETAL1tK INIXQZcdrd/HW/A+rCHc6aZVpmXCZoDeeq1+JuxiujwWee1l0I5AzxcvsJ52AGVW9dA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795452843; h=Received:DKIM-Signature:Mime-Version:Content-Transfer-Encoding: Content-Type:Date:Message-Id:From:Subject:Cc:To:References: In-Reply-To; bh=+s+2JqGfV/wt1208sMgNo78UahYBAE4HE3ngb4zFNXI=; b=REcVcC3a2MUH942XUDgMiCaaS6cGCUrhMOeKqElREcEWxEaQCAEYWYn74w0m351raMWt /ECjiiPId0+/RCys3Q0dQsGSmu8mNVGciRCpkvDgpl/yAyPtv9pvjn/S9Cp4dEX6raBKO hGZh4/E1/o8wQxqICC0u7JtiXFAkvsUFi2avie/YvkX4rQTxH1f91XVuNe3y55Epf/GP3 ro7nlvSdD7cbEhSJZ0ippC0R5ugWuOfjChk5y6VKWGBjx5aA6neeDi4ar5NhJZgfTxT7Y f88DWOUCIbzx3b0TZ+00zDz1btfAkx83VLZt3dkX6gWQ/mScklUsWehqWop9lXGIx/A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=gGv8K8A4; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E119606A31A for ; Mon, 23 Nov 2026 16:54:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=gGv8K8A4 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7032B1F000CA; Mon, 23 Nov 2026 16:54:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795452842; bh=+s+2JqGfV/wt1208sMgNo78UahYBAE4HE3ngb4zFNXI=; h=Date:From:Subject:Cc:To:References:In-Reply-To; b=gGv8K8A4oKtmEseyLt+MAwYOjkPv5tc5XyC8c6rXsbZrHp3mIv2MsNMU3GFkROkfq 35zpB3HhWPMLyG7Hzf83LdFZ4mYhg18is9I4JZxpTA8436qLoe5Sm7SvYEohRwP0d6 qEkBR4ubg1F3VP80xAYG0PdCus+iFtOEV/Es3SeAX1Jmed4gH2NNMcDkGYHQf4Jqao YqAeeqrOe9eplb1Fm4bdIuGH5LtclnEFM4g4VyRs+qwlige1FOWTlGDPiQrqf/rbFV vFIxy3tmVxmAR/bcxt8yo4Cn9aqqDWDpZ7i39EZsRcL6nQ5RtSpfIYacSNrJaMljaq vnkg96Ax+/hRQ== X-Mailing-List: nova-gpu@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 23 Nov 2026 17:53:59 +0100 Message-Id: From: "Danilo Krummrich" Subject: Re: [PATCH v2 3/3] nova-core: only bind to GPUs when explicitly requested Cc: , "Lyude Paul" , "Alexandre Courbot" , , , To: "Dave Airlie via B4 Relay" References: <20261123-nova-nouveau-gsp-v2-0-5e8c27aa8555@redhat.com> <20261123-nova-nouveau-gsp-v2-3-5e8c27aa8555@redhat.com> In-Reply-To: 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. >> =20 >> 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=3D1, 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=3DN or nouveau.bind_gsp=3D0 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=3Dy && DRM_NOUVEAU_BIND_GSP=3Dy > > - NOVA_CORE_BIND_GSP=3Dn && DRM_NOUVEAU_BIND_GSP=3Dn > > 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 !=3D n && NOVA_CORE !=3D 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. > =09 > Override this default using the nouveau.bind_gsp and > nova-core.bind_gsp module parameters. > =09 > Nova is work in progress and may not be functional. > This option is intended for developers and testers only. > =09 > If unsure, say N. > > I think for the module parameters it is probably fine to not restrict thi= s > ambiguity. > > We've also discussed whether we can detect vGPU mode in order to pass GPU= s with > vGPU mode enabled to nova-core regardless. I think this requires an FSP r= equest > via EMEM (at least on Blackwell), so it should be possible to implement t= hat > with the existing infrastructure in nouveau as well, but I'm not convince= d it's > worth it. > >> + If unsure, say N. >> diff --git a/drivers/gpu/nova-core/driver.rs b/drivers/gpu/nova-core/dri= ver.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"); >> =20 >> try_pin_init!(NovaCore { >> + // Only bind when explicitly requested through the correspo= nding >> + // Kconfig option or module parameter. By default, leave NV= IDIA >> + // 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=3Dy or nova-core.bind_gsp=3D1= \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_ini= t!(). Actually, please disregard the latter, I want to avoid the need for pin_init_scope().