From: Danilo Krummrich <dakr@kernel.org>
To: dakr@kernel.org, aliceryhl@google.com, airlied@gmail.com,
simona@ffwll.ch, ojeda@kernel.org, boqun@kernel.org,
gary@garyguo.net, bjorn3_gh@protonmail.com, lossin@kernel.org,
a.hindborg@kernel.org, tmgross@umich.edu,
daniel.almeida@collabora.com, tamird@kernel.org,
acourbot@nvidia.com, work@onurozkan.dev, jhubbard@nvidia.com,
apopple@nvidia.com, ecourtney@nvidia.com, lyude@redhat.com,
kherbst@redhat.com
Cc: nova-gpu@lists.linux.dev, dri-devel@lists.freedesktop.org,
rust-for-linux@vger.kernel.org
Subject: [PATCH 3/3] drm/nova: require explicit opt-in to unstable uAPI
Date: Mon, 19 Oct 2026 23:24:47 +0200 [thread overview]
Message-ID: <20261019212535.88390-4-dakr@kernel.org> (raw)
In-Reply-To: <20261019212535.88390-1-dakr@kernel.org>
Nova and its uAPI are under active upstream development. Require users
to acknowledge that the uAPI is not yet stable and may change
incompatibly before enabling the driver.
Refuse to load unless acknowledge_unstable_uapi=1 is set, and taint the
kernel when enabled. This keeps use of the unstable interfaces an
explicit opt-in while they are developed upstream.
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
---
drivers/gpu/drm/nova/Kconfig | 11 +++++++-
drivers/gpu/drm/nova/nova.rs | 55 ++++++++++++++++++++++++++++++++++--
2 files changed, 63 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/nova/Kconfig b/drivers/gpu/drm/nova/Kconfig
index ba16c74401f8..2cb62517b2f9 100644
--- a/drivers/gpu/drm/nova/Kconfig
+++ b/drivers/gpu/drm/nova/Kconfig
@@ -12,6 +12,15 @@ config DRM_NOVA
Choose this if you want to build the Nova DRM driver for Nvidia
GSP-based GPUs.
- This driver is work in progress and may not be functional.
+ This driver is under active upstream development and may not be
+ functional. Its uAPI is intended to be developed upstream alongside
+ the driver and is not yet stable. It may change incompatibly during
+ development.
+
+ Loading requires the acknowledge_unstable_uapi=1 module parameter, or
+ nova-drm.acknowledge_unstable_uapi=1 on the kernel command line when
+ built in.
+
+ Enabling the driver taints the kernel.
If M is selected, the module will be called nova-drm.
diff --git a/drivers/gpu/drm/nova/nova.rs b/drivers/gpu/drm/nova/nova.rs
index 1fd454c7e0df..ad68f6e1a613 100644
--- a/drivers/gpu/drm/nova/nova.rs
+++ b/drivers/gpu/drm/nova/nova.rs
@@ -2,16 +2,67 @@
//! Nova DRM Driver
+use kernel::{
+ auxiliary,
+ driver::Registration,
+ panic::{
+ self,
+ Lockdep,
+ Taint, //
+ },
+ prelude::*,
+ InPlaceModule, //
+};
+
mod driver;
mod file;
mod gem;
use crate::driver::NovaDriver;
-kernel::module_auxiliary_driver! {
- type: NovaDriver,
+module! {
+ type: NovaModule,
name: "nova-drm",
authors: ["Danilo Krummrich"],
description: "Nova GPU driver",
license: "GPL v2",
+ params: {
+ acknowledge_unstable_uapi: bool {
+ default: false,
+ description: "Acknowledge that Nova and its uAPI are under active upstream development \
+ and the uAPI may change incompatibly; enable the driver (taints kernel)",
+ },
+ },
+}
+
+#[pin_data]
+struct NovaModule {
+ #[pin]
+ _driver: Registration<auxiliary::Adapter<NovaDriver>>,
+}
+
+impl NovaModule {
+ fn check_unstable_uapi() -> Result {
+ pr_warn!("Nova and its uAPI are under active upstream development\n");
+
+ if !module_parameters::acknowledge_unstable_uapi.value() {
+ pr_err!("Driver disabled: Nova's uAPI is unstable and may change incompatibly\n");
+ pr_info!("Set nova-drm.acknowledge_unstable_uapi=1 to enable (taints kernel)\n");
+ return Err(EPERM);
+ }
+
+ pr_warn!("Unstable uAPI enabled; userspace compatibility is not guaranteed\n");
+ panic::add_taint(Taint::User, Lockdep::StillOk);
+
+ Ok(())
+ }
+}
+
+impl InPlaceModule for NovaModule {
+ fn init(module: &'static kernel::ThisModule) -> impl PinInit<Self, Error> {
+ try_pin_init!(Self {
+ _: { Self::check_unstable_uapi()? },
+ _driver <- Registration::new(<Self as kernel::ModuleMetadata>::NAME, module),
+ })
+ }
}
--
2.56.0
next prev parent reply other threads:[~2026-10-19 21:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 21:24 [PATCH 0/3] drm/nova: make unstable uAPI use explicit Danilo Krummrich
2026-10-19 21:24 ` [PATCH 1/3] drm/nova: mark the uAPI header as unstable Danilo Krummrich
2026-10-19 22:08 ` Faith Ekstrand
2026-10-20 14:36 ` M Henning
2026-10-19 21:24 ` [PATCH 2/3] rust: add kernel taint abstraction Danilo Krummrich
2026-10-19 21:24 ` Danilo Krummrich [this message]
2026-10-19 21:32 ` [PATCH 3/3] drm/nova: require explicit opt-in to unstable uAPI sashiko-bot
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=20261019212535.88390-4-dakr@kernel.org \
--to=dakr@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=kherbst@redhat.com \
--cc=lossin@kernel.org \
--cc=lyude@redhat.com \
--cc=nova-gpu@lists.linux.dev \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.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