public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] gpu: nova-core: add fwctl driver
@ 2026-03-05 19:09 Zhi Wang
  2026-03-05 19:09 ` [PATCH 1/2] fwctl: use subsys_initcall for built-in configuration Zhi Wang
  2026-03-05 19:09 ` [PATCH 2/2] gpu: nova-core: add fwctl driver for firmware control interface Zhi Wang
  0 siblings, 2 replies; 5+ messages in thread
From: Zhi Wang @ 2026-03-05 19:09 UTC (permalink / raw)
  To: rust-for-linux, linux-kernel
  Cc: dakr, jgg, gary, joelagnelf, aliceryhl, bhelgaas, kwilczynski,
	ojeda, alex.gaynor, boqun.feng, bjorn3_gh, lossin, a.hindborg,
	tmgross, markus.probst, helgaas, cjia, smitra, ankita, aniketa,
	kwankhede, targupta, acourbot, jhubbard, zhiwang, daniel.almeida,
	Zhi Wang

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@nvidia.com/T/#t
[2] https://lore.kernel.org/nouveau/DGTZATU21WV2.1YRBLUAXFHMVJ@nvidia.com/T/#t
[3] https://lore.kernel.org/all/20260217204909.211793-1-zhiw@nvidia.com/
[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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-13 16:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05 19:09 [PATCH 0/2] gpu: nova-core: add fwctl driver Zhi Wang
2026-03-05 19:09 ` [PATCH 1/2] fwctl: use subsys_initcall for built-in configuration Zhi Wang
2026-03-05 19:09 ` [PATCH 2/2] gpu: nova-core: add fwctl driver for firmware control interface Zhi Wang
2026-03-13 16:03   ` Danilo Krummrich
2026-03-13 16:26     ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox