Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [PATCH v3 0/1] gpu: nova-core: add fwctl driver for firmware control interface
@ 2026-11-24 14:42 Alok Kumar
  2026-11-24 14:42 ` [PATCH v3 1/1] " Alok Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: Alok Kumar @ 2026-11-24 14:42 UTC (permalink / raw)
  To: dakr, acourbot, kvm, rust-for-linux, nova-gpu, linux-pci
  Cc: alex, jgg, yishaih, skolothumtho, kevin.tian, airlied, simona,
	ojeda, alex.gaynor, boqun.feng, gary, bjorn3_gh, lossin,
	a.hindborg, aliceryhl, tmgross, markus.probst, jhubbard, apopple,
	joelagnelf, ecourtney, cjia, smitra, kjaju, alkumar, ankita,
	aniketa, kwankhede, targupta, linux-kernel, zhiwang, zhiw, boqun,
	daniel.almeida, tamird, work, jgg, bhelgaas, kwilczynski,
	dri-devel, peter, xinmengs

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
      |
      | typed GMC request
      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. 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 v5 00/35] Introduce NVIDIA vGPU manager [1]

Userspace tools:

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

Changes since v2 [2]:

    - Define CommandToGsp request types for the seven permitted commands
      and submit them through send_gmc_command().
    - Add the missing management command variants to GmcCommandId instead
      of exporting numeric constants through the vGPU firmware module.
    - Read successful response payloads through MessageFromGsp into an
      owned buffer before the receive-queue slot is consumed.
    - Preserve firmware-error handling: return EIO when GSP rejects a
      command, while propagating transport errors.
    - Use pin-init self-reference support to borrow the GPU-owned command
      queue. Unregister fwctl and drain callbacks before dropping GPU
      resources.
    - Add the new userspace header to Nova's MAINTAINERS entry.

The userspace request/response format, seven-command allowlist,
configuration scope restriction and response-capacity limit are
unchanged. GMC, MCTP and NVDM transport headers remain inside nova-core.

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

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

Previous postings:

v2 posting: [2]
v1 posting: [3]

[1]
https://lore.kernel.org/nova-gpu/20261124135937.18583-1-alkumar@nvidia.com/
[2]
https://lore.kernel.org/nova-gpu/cover.1793906674.git.alkumar@nvidia.com/
[3]
https://lore.kernel.org/rust-for-linux/20260305190936.398590-1-zhiw@nvidia.com/


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

 MAINTAINERS                        |   1 +
 drivers/gpu/nova-core/Kconfig      |   2 +
 drivers/gpu/nova-core/driver.rs    |  23 +++++
 drivers/gpu/nova-core/fwctl.rs     | 160 +++++++++++++++++++++++++++++
 drivers/gpu/nova-core/gsp/fw.rs    |   5 +
 drivers/gpu/nova-core/nova_core.rs |   2 +
 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, 232 insertions(+)
 create mode 100644 drivers/gpu/nova-core/fwctl.rs
 create mode 100644 include/uapi/fwctl/nova-core.h


base-commit: 7c4cb57138562f96b53683e29c8fddef73d57294
-- 
2.53.0


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

end of thread, other threads:[~2026-11-24 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 14:42 [PATCH v3 0/1] gpu: nova-core: add fwctl driver for firmware control interface Alok Kumar
2026-11-24 14:42 ` [PATCH v3 1/1] " Alok Kumar

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