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=1796272636; b=pYbPwor0jG9By0QYsoAJp7SWTwBWRftMgaPp2tyV3zhuXxA2NfAvaQMGROSeJb9hxgHM CsBBEes/+xleeacNA0cCuITkQSUkTkTWcb/eA3Txryld04g4G1f953U1UCAOl8YccmPar 6YBQHp+VWfGE0gaYx9il5IjwvKH+R6GzqHm4ZuDtEU1q/YXJS8LegdDwOdAfb5eISpdmX OAPIjv8/ge5Shf9x0H5v/6s5cgT9JNznr1nzgoRe0gmul1e1jK9kYswLd57Abs0UXG/RA vMqbeiQPwtvwf8VG6Z5k8nqZs7RzEFnJ7ZXkSiWCgaIP7G58ZZrrDIVH20Xvk/BMYaQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796272636; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=CM3nOdEhA4RNVn05LqQHFzMbHRkjWCazM8Dg5kPx6rg=; b=hDIA+8jB5El63ngDdVv5a1Pqub764jq84DBU/A6GRzHe1usR63Eo/9iWg7jbycjjfGgQ vJAKqR1ExrsTjivJaZpd4tsZ5zw0z1KP6wmGmLeMfmluIo0Mwm/z9LJ3ghEznw5I8j5QU FYskNfeUnw3rTmAghHmyKdfMBX5CwJju55jq5Wi+sPekeSAg8qZVIiuH0Vj5J+DpoOVSv T/asrbw4dILN02Y80cen8xaXIQj24OIYdrLUYJhMLBi24A0LpvN6OI5XrA1AkLay64Ljs NZAA2fKg16ADNEKssgtmsvh/XwA9EdUHOp2VpnHz2pMLSznrRdfYp029C2sfliYLtjQ== 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=jU+0lNhs; 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 95324606A32D for ; Thu, 3 Dec 2026 04:37:16 +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=jU+0lNhs Received: by smtp.kernel.org (Postfix) with ESMTPSA id E59F91F000C1; Thu, 3 Dec 2026 04:37:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796272636; bh=CM3nOdEhA4RNVn05LqQHFzMbHRkjWCazM8Dg5kPx6rg=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=jU+0lNhsKspUwDXIxXQohs8EcInXmB0DcoERvVXa/4o//o+gXmzcDYYqC3WaPSxdu yZZ+gvq94psqpcbxCef44w0T0QObQ0z1gByvkFwnprT5JrozZsvoqVqda2F2FLr18m R8sld5YSBgoDM8qiihaY++9xxE2x+D8Cf3QN3bn7+4xOvh/IuDCEqmNG5/2oZNmFrz 58liCI6fkDHPuFN+4pB2jl0BhjsdUi11wEOd2dj1jvg1bPBaW3XMwH4canBzUCXRAM 0FPUbGLFqsqVQnM3NQmb8nCx0K1LW5TBF60smeyqR+NFgDf41KFEt+GCCey78wIpUT xVygswjYRUlUA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v4 2/2] nova-core: only bind to GPUs when explicitly requested Reply-To: sashiko-reviews@lists.linux.dev To: "Dave Airlie" , "Lyude Paul" , "Danilo Krummrich" , "Alexandre Courbot" Cc: dri-devel@lists.freedesktop.org, nova-gpu@lists.linux.dev In-Reply-To: <20261203-nova-nouveau-gsp-v4-2-eb3e5e111968@redhat.com> References: <20261203-nova-nouveau-gsp-v4-0-eb3e5e111968@redhat.com> <20261203-nova-nouveau-gsp-v4-2-eb3e5e111968@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 04:37:15 +0000 X-Mailing-List: nova-gpu@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 4 potential issues to consider: - [Medium] nova-core: single-parameter bind_gsp override leaves drivers competing - [Medium] nova-core: NOVA_CORE_BIND_GSP omits DRM_NOUVEAU dependency - [Medium] nova-core: bool NOVA_CORE_BIND_GSP auto-enabled by allmodconfig/allyesconfig - [Low] nova-core: check_bind_allowed() logs wrong advice on pre-Turing GPUs -- commit f2eb3485ce9fa1c56177d400d79136d6dcbb2d41 Author: Dave Airlie nova-core: only bind to GPUs when explicitly requested This commit adds the NOVA_CORE_BIND_GSP Kconfig option and bind_gsp module parameter so nova-core only binds to NVIDIA GPUs when explicitly requested, returning -ENODEV from probe() otherwise. > diff --git a/drivers/gpu/nova-core/Kconfig b/drivers/gpu/nova-core/Kconfig > index 2e11e46c99c76..a6d8797d245ce 100644 > --- a/drivers/gpu/nova-core/Kconfig > +++ b/drivers/gpu/nova-core/Kconfig > @@ -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 [Severity: Medium] As reported by Danilo Krummrich on v2 [1], should NOVA_CORE_BIND_GSP depend on DRM_NOUVEAU !=3D n && NOVA_CORE !=3D n instead of only NOVA_CORE? When CONFIG_DRM_NOUVEAU=3Dn, Kconfig still exposes this nouveau-vs-nova-core switch, and bind_gsp defaults to cfg!(CONFIG_NOVA_CORE_BIND_GSP) in nova_core.rs. A standalone nova-core build therefore rejects every GPU probe with -ENODEV by default even though it is the only NVIDIA driver. Gating NOVA_CORE_BIND_GSP on both drivers and defaulting bind_gsp to !cfg!(CONFIG_DRM_NOUVEAU) || cfg!(CONFIG_NOVA_CORE_BIND_GSP) avoids both problems. [Severity: Medium] As reported by Gary Guo on v3 [2], won't allmodconfig, allyesconfig, and automated distro config scripts that select y on new booleans force NOVA_CORE_BIND_GSP=3Dy despite default n? Because this option only flips the runtime binding defaults, enabling it automatically makes work-in-progress nova-core claim Turing and later GPUs while nouveau rejects them with -ENODEV. Using a Kconfig choice block (whose default allmodconfig and allyesconfig preserve) or inverting the boolean polarity to default y for nouveau avoids this. [ ... ] > + 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 GSP-capable GPUs > + instead. For a single boot, nouveau.bind_gsp=3D1 makes nouveau > + claim them again. [Severity: Medium] Does booting with only nova-core.bind_gsp=3D1 or only nouveau.bind_gsp=3D1 actually switch drivers when both nouveau and nova-core are enabled? Neither driver checks the other's runtime bind_gsp parameter. With both built-in and CONFIG_NOVA_CORE_BIND_GSP=3Dn, passing only nova-core.bind_gsp= =3D1 leaves nouveau_bind_gsp enabled, and drm/ links before nova-core.o so nouve= au still probes first and claims the GPU (when both are modules, they race). Switching drivers for a single boot requires setting both parameters, e.g. nova-core.bind_gsp=3D1 nouveau.bind_gsp=3D0. The dev_info!() message in check_bind_allowed() has the same omission, and the bind_gsp parameter description inaccurately says it makes nova-core the default NVIDIA driver. [ ... ] > diff --git a/drivers/gpu/nova-core/nova_core.rs b/drivers/gpu/nova-core/n= ova_core.rs > index 84f7778445926..0aaf4f6c07f83 100644 > --- a/drivers/gpu/nova-core/nova_core.rs > +++ b/drivers/gpu/nova-core/nova_core.rs [ ... ] > + pub(crate) fn check_bind_allowed(pdev: &pci::Device>) -> Re= sult { > + if crate::module_parameters::bind_gsp.value() { > + return Ok(()); > + } > + > + dev_info!( > + pdev, > + "Not binding to GPU; enable with CONFIG_NOVA_CORE_BIND_GSP= =3Dy or nova-core.bind_gsp=3D1\n" > + ); > + Err(ENODEV) > + } [Severity: Low] As reported by John Hubbard on v3 [3], isn't this advice misleading on pre-Turing GPUs? PCI_TABLE matches all NVIDIA VGA and 3D devices, and NovaCoreDriver::probe() calls check_bind_allowed() before identifying the chipset. On pre-Turing GPUs, enabling bind_gsp still fails later with -ENODEV; a shorter message like "Not binding to GPU (bind_gsp=3D0)" avoids misleading users. [1] https://lore.kernel.org/r/DN2OVF03FAL6.2EKLEYINW79YO@kernel.org [2] https://lore.kernel.org/r/DN3IDZ94G4NN.1FUTSE7B4G1ZK@garyguo.net [3] https://lore.kernel.org/r/95e63e66-1143-4c81-9206-68149ce00071@nvidia.c= om --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203-nova-nouve= au-gsp-v4-0-eb3e5e111968@redhat.com?part=3D2