From: Alexandre Courbot <acourbot@nvidia.com>
To: Miguel Ojeda <ojeda@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nsc@kernel.org>, Miguel Ojeda <ojeda@kernel.org>,
Boqun Feng <boqun@kernel.org>, Gary Guo <gary@garyguo.net>,
Björn Roy Baron <bjorn3_gh@protonmail.com>,
Benno Lossin <lossin@kernel.org>,
Andreas Hindborg <a.hindborg@kernel.org>,
Alice Ryhl <aliceryhl@google.com>,
Trevor Gross <tmgross@umich.edu>,
Danilo Krummrich <dakr@kernel.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: John Hubbard <jhubbard@nvidia.com>,
Alistair Popple <apopple@nvidia.com>,
Timur Tabi <ttabi@nvidia.com>, Zhi Wang <zhiw@nvidia.com>,
Eliot Courtney <ecourtney@nvidia.com>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
rust-for-linux@vger.kernel.org, nova-gpu@lists.linux.dev,
dri-devel@lists.freedesktop.org,
Alexandre Courbot <acourbot@nvidia.com>,
Joel Fernandes <joelagnelf@nvidia.com>
Subject: [PATCH v2 0/7] gpu: drm: nova: enable calling into nova-core
Date: Wed, 27 May 2026 20:52:16 +0900 [thread overview]
Message-ID: <20260527-nova-exports-v2-0-06de4c556d55@nvidia.com> (raw)
`nova-drm` is scheduled to expose a user-space API to receive IOCTLs
from user-mode drivers, and to call into `nova-core` to perform the
actual work. We are about to reach the state where we need the ability
to call into `nova-core`, but the current Rust build system does not
currently support this, and the solution will likely take at least a
couple of cycles to be merged.
In the meantime, this series introduces a Nova-local workaround for
`nova-drm` to call into `nova-core`. It generates the `nova-core`
metadata that `nova-drm` can use to resolve references at build-time,
and also builds a list of exported symbols for symbol resolution when
modules are loaded.
Since Rust symbols are long, this work ran into the limits on symbol
sizes `modpost` can handle; however the overflow path was not properly
handled, which resulted in late failures. The first patch makes
`modpost` fail on symbols that are too long for its internal buffer and
report them. It is not strictly necessary for this series and can be
merged independently if preferred.
The second and third patches instruct the compiler to inline some
methods of `pin_init` and Rust basic types to avoid those long symbol
names. Interestingly, this also results in a smaller nova-core binary
size [1].
The rest of the patches enable inter-module calls from nova-drm to
nova-core.
This series is based on `drm-rust-next` with [2] and [3] applied.
[1] https://lore.kernel.org/all/DIN76NTFEU1N.1RT6G4IFD62RG@nvidia.com/
[2] https://lore.kernel.org/all/20260525202921.124698-1-dakr@kernel.org/
[3] https://lore.kernel.org/all/20260525225838.276108-1-dakr@kernel.org/
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
Changes in v2:
- Rebase on top of HRT v5.
- Inline some `pin_init` and Rust basic types methods to avoid long
symbol names and optimize code.
- Print truncating modpost symbols and abort upon meeting them.
- Drop increase of `buf_printf`'s buffer.
- Drop obsolete nova-core renaming patch.
- Link to v1: https://patch.msgid.link/20260430-nova-exports-v1-0-7ca31664e983@nvidia.com
---
Alexandre Courbot (7):
scripts: modpost: detect and report truncated buf_printf() output
pin_init: always inline the #ident and #project_ident methods
rust: always inline some init methods
gpu: nova-core: export Rust symbols for dependent modules
gpu: nova-core: emit Rust metadata for dependent modules
gpu: drm: nova: build after nova-core metadata
[POC] drm: nova: demonstrate interaction with nova-core
drivers/gpu/drm/nova/Makefile | 15 ++++++++
drivers/gpu/drm/nova/driver.rs | 9 ++++-
drivers/gpu/nova-core/Makefile | 46 +++++++++++++++++++++++-
drivers/gpu/nova-core/driver.rs | 59 +++++++++++++++++++++++--------
drivers/gpu/nova-core/gpu.rs | 9 +++--
drivers/gpu/nova-core/nova_core.rs | 4 +--
drivers/gpu/nova-core/nova_core_exports.c | 13 +++++++
rust/kernel/alloc/kbox.rs | 2 ++
rust/kernel/init.rs | 1 +
rust/kernel/sync/arc.rs | 2 ++
rust/kernel/types.rs | 3 ++
rust/pin-init/internal/src/pin_data.rs | 2 ++
scripts/mod/modpost.c | 11 +++++-
13 files changed, 154 insertions(+), 22 deletions(-)
---
base-commit: 79c29e27d676a74f9238506a5fe2134637356708
change-id: 20260430-nova-exports-502f996c5aab
Best regards,
--
Alexandre Courbot <acourbot@nvidia.com>
next reply other threads:[~2026-05-27 11:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 11:52 Alexandre Courbot [this message]
2026-05-27 11:52 ` [PATCH v2 1/7] scripts: modpost: detect and report truncated buf_printf() output Alexandre Courbot
2026-05-27 17:18 ` Nathan Chancellor
2026-05-28 2:21 ` Claude review: " Claude Code Review Bot
2026-05-27 11:52 ` [PATCH v2 2/7] pin_init: always inline the #ident and #project_ident methods Alexandre Courbot
2026-05-27 17:49 ` Gary Guo
2026-05-28 2:22 ` Claude review: " Claude Code Review Bot
2026-05-27 11:52 ` [PATCH v2 3/7] rust: always inline some init methods Alexandre Courbot
2026-05-27 17:54 ` Gary Guo
2026-05-28 2:22 ` Claude review: " Claude Code Review Bot
2026-05-27 11:52 ` [PATCH v2 4/7] gpu: nova-core: export Rust symbols for dependent modules Alexandre Courbot
2026-05-28 2:22 ` Claude review: " Claude Code Review Bot
2026-05-27 11:52 ` [PATCH v2 5/7] gpu: nova-core: emit Rust metadata " Alexandre Courbot
2026-05-28 2:22 ` Claude review: " Claude Code Review Bot
2026-05-27 11:52 ` [PATCH v2 6/7] gpu: drm: nova: build after nova-core metadata Alexandre Courbot
2026-05-28 2:22 ` Claude review: " Claude Code Review Bot
2026-05-27 11:52 ` [PATCH POC v2 7/7] drm: nova: demonstrate interaction with nova-core Alexandre Courbot
2026-05-28 2:22 ` Claude review: " Claude Code Review Bot
2026-05-28 2:21 ` Claude review: gpu: drm: nova: enable calling into nova-core Claude Code Review 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=20260527-nova-exports-v2-0-06de4c556d55@nvidia.com \
--to=acourbot@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=joelagnelf@nvidia.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=nathan@kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=nsc@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tmgross@umich.edu \
--cc=ttabi@nvidia.com \
--cc=zhiw@nvidia.com \
/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