Skip to content

gpu: nova-core: add fwctl driver for firmware control interface

Alok Kumar dri-devel kvm linux-pci lkml nova-gpu rust-for-linux 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest1 patch 0 repliesNew

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1gpu: nova-core: add fwctl driver for firmware control interfacedrivers/gpu/nova-core/Kconfig drivers/gpu/nova-core/driver.rs drivers/gpu/nova-core/fwctl.rs +7 more+215 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/1] gpu: nova-core: add fwctl driver for firmware control interface

Add a fwctl endpoint to nova-core for the GSP GMC API commands used to manage vGPU types on a physical GPU.

The request path is:

userspace
|
| FWCTL_RPC (FWCTL_RPC_CONFIGURATION)
v
nova-core command allowlist
|
| GMC command ID and payload
v
GSP command queue -> GSP-RM

Userspace supplies the native GMC command ID and command-specific payload. nova-core constructs the transport headers and permits only the seven vGPU management commands for adding, querying, assigning, and deassigning vGPU types. All other commands and scopes are rejected.

The request starts with an eight-byte header containing command_id and a zero reserved field, followed by the command-specific payload. The response echoes this header and appends the firmware response payload.

This series is based on:

[PATCH v4 00/32] Introduce NVIDIA vGPU manager [1]

A userspace implementation is available at:

https://github.com/alokk-nvidia/vgpu-tools/tree/m1-nvkv/fwctl

Changes since the previous posting [2]:

- Pass native GMC command IDs and payloads instead of translating a driver-specific command.
- Keep the MCTP/NVDM transport framing inside nova-core.
- Allowlist the seven vGPU management commands in configuration scope.
- Borrow the GPU-owned command queue through lifetime-bound fwctl registration data instead of looking up PCI driver data in callbacks. No separate BAR0 reference is stored in the registration data.
- Register fwctl after GPU and auxiliary-device initialization, and unregister it and drain callbacks before dropping GPU resources.

The complete integration tree, including the prerequisites and the companion VFIO driver, is available at:

    https://github.com/alokk-nvidia/nova-core/tree/nova-vgpu-wip-20261105

[1] https://lore.kernel.org/nova-gpu/[email protected]/
[2] https://lore.kernel.org/rust-for-linux/[email protected]/

Zhi Wang (1):
gpu: nova-core: add fwctl driver for firmware control interface

 drivers/gpu/nova-core/Kconfig      |   2 +
 drivers/gpu/nova-core/driver.rs    |  27 +++++++
 drivers/gpu/nova-core/fwctl.rs     | 119 +++++++++++++++++++++++++++++
 drivers/gpu/nova-core/nova_core.rs |   2 +
 drivers/gpu/nova-core/vgpu.rs      |  10 +++
 drivers/gpu/nova-core/vgpu/fw.rs   |  18 ++++-
 include/uapi/fwctl/fwctl.h         |   1 +
 include/uapi/fwctl/nova-core.h     |  34 +++++++++
 rust/kernel/fwctl.rs               |   2 +
 rust/uapi/uapi_helper.h            |   2 +
 10 files changed, 215 insertions(+), 2 deletions(-)
 create mode 100644 drivers/gpu/nova-core/fwctl.rs
 create mode 100644 include/uapi/fwctl/nova-core.h

base-commit: 132a3ca37584de0473193e8186c61e46ff8042d3

Signature · 1 line
2.53.0