[PATCH 0/2] gpu: nova-core: add fwctl driver
From: Zhi Wang
Date: Thu Mar 05 2026 - 14:10:16 EST
This series adds a fwctl driver to nova-core, enabling userspace to issue
firmware commands to the GSP through the standard fwctl ioctl
interface. E.g. uploading the vGPU type blobs and managing the vGPU
lifecycle, which is previously implemented in sysfs.
Patch 1 fixes a boot-order issue: since Rust fwctl abstractions force
fwctl to be built-in (Kconfig bool), the fwctl class must be registered
before PCI drivers probe. Switching from module_init to subsys_initcall
ensures this.
Patch 2 adds the nova-core fwctl driver itself. It defines a UAPI for
nova-core specific RPC commands and wires them through to the GSP via
the existing RM control command infrastructure. As a first user, the
UPLOAD_VGPU_TYPE command is added, which uploads vGPU type definitions
to the GSP. It is a required step before any vGPU can be created.
This patchset depends on several series:
- [PATCH v5 0/9] gpu: nova-core: gsp: add continuation record support [1]
- [PATCH v3 0/5] gpu: nova-core: gsp: add locking to Cmdq [2]
- [PATCH v3 0/1] rust: introduce abstractions for fwctl [3]
And a tree with all the patches can be found here.[4]
[1] https://lore.kernel.org/nouveau/20260304-cmdq-continuation-v5-0-3f19d759ed93@xxxxxxxxxx/T/#t
[2] https://lore.kernel.org/nouveau/DGTZATU21WV2.1YRBLUAXFHMVJ@xxxxxxxxxx/T/#t
[3] https://lore.kernel.org/all/20260217204909.211793-1-zhiw@xxxxxxxxxx/
[4] https://github.com/zhiwang-nvidia/nova-core/tree/nova-core/fwctl-driver-v1
Zhi Wang (2):
fwctl: use subsys_initcall for built-in configuration
gpu: nova-core: add fwctl driver for firmware control interface
drivers/fwctl/main.c | 2 +-
drivers/gpu/nova-core/fwctl.rs | 99 +++++++++++++++++++
drivers/gpu/nova-core/gpu.rs | 4 +-
drivers/gpu/nova-core/gsp.rs | 25 ++++-
drivers/gpu/nova-core/gsp/boot.rs | 6 +-
.../gpu/nova-core/gsp/fw/r570_144/bindings.rs | 1 +
drivers/gpu/nova-core/gsp/fw/rm.rs | 5 +
drivers/gpu/nova-core/gsp/rm/commands.rs | 4 +-
drivers/gpu/nova-core/nova_core.rs | 2 +
include/uapi/fwctl/fwctl.h | 1 +
include/uapi/fwctl/nova-core.h | 52 ++++++++++
rust/kernel/fwctl.rs | 2 +
rust/uapi/uapi_helper.h | 1 +
13 files changed, 194 insertions(+), 10 deletions(-)
create mode 100644 drivers/gpu/nova-core/fwctl.rs
create mode 100644 include/uapi/fwctl/nova-core.h
--
2.51.0