Booting up GSP with vGPU enabled is part of the first milestone (M1)
together with the Rust fwctl abstraction [1] and the nova-core fwctl
driver [2] for upstream vGPU support. It allows us to validate the basic
GSP boot flow with vGPU enabled and upload vGPU types even before the
remaining nova-core dependencies are ready. The nova-vgpu WIP patches
for all milestones can be found at [3].
This version is based on drm-rust-next plus Alexandre's GSP boot process
consolidation series [4].
v2:
- Rebase on top of Alexandre's GSP boot process consolidation series.
- Drop the FSP response, FSP documentation, and GspBootContext patches
that are already in drm-rust-next or superseded by the prerequisite
boot consolidation series.
- Change pci_sriov_get_totalvfs() to return u16 and update existing C
callers accordingly.
- Make the Rust sriov_get_totalvfs() helper return u16 directly.
- Rework the FSP PRC vGPU mode query to use typed subcommand, object ID,
flags, request, and response structures.
- Move vGPU state detection before GSP boot into a read-only VgpuManager,
avoiding Mutex/Cell based mutation during boot.
- Add a HAL method for the vGPU capability gate.
- Split the SetRegistry changes into a dynamic-entry refactor and the
RMSetSriovMode functional change.
- Rework WPR2 heap sizing to consume VgpuManager, keep the vGPU heap-size
helper in gsp/fw.rs, and drop the 1VM heap-size special case.
[1] https://lore.kernel.org/rust-for-linux/20260217204909.211793-1-zhiw@nvidia.com/
[2] https://lore.kernel.org/rust-for-linux/20260305190936.398590-1-zhiw@nvidia.com/
[3] https://github.com/zhiwang-nvidia/nova-core/tree/zhi/nova-vgpu-wip
[4] https://lore.kernel.org/all/20260622-nova-bootcontext-v2-13-0ddeafc06f5d@nvidia.com/
Zhi Wang (7):
PCI/IOV: Return u16 from pci_sriov_get_totalvfs()
rust: pci: Add sriov_get_totalvfs() helper
gpu: nova-core: read vGPU mode from FSP via PRC protocol
gpu: nova-core: add vGPU preludes
gpu: nova-core: build SetRegistry entries dynamically
gpu: nova-core: set RMSetSriovMode when vGPU is enabled
gpu: nova-core: reserve larger WPR2 heap for vGPU
drivers/crypto/hisilicon/qm.c | 8 +-
.../crypto/intel/qat/qat_common/adf_sriov.c | 6 +-
drivers/gpu/drm/xe/xe_sriov_pf.c | 6 +-
drivers/gpu/nova-core/fb.rs | 25 ++-
drivers/gpu/nova-core/fsp.rs | 194 +++++++++++++++++-
drivers/gpu/nova-core/gpu.rs | 12 ++
drivers/gpu/nova-core/gpu/hal.rs | 3 +
drivers/gpu/nova-core/gpu/hal/gh100.rs | 12 +-
drivers/gpu/nova-core/gpu/hal/tu102.rs | 5 +
drivers/gpu/nova-core/gsp.rs | 3 +
drivers/gpu/nova-core/gsp/boot.rs | 11 +-
drivers/gpu/nova-core/gsp/commands.rs | 79 ++++---
drivers/gpu/nova-core/gsp/fw.rs | 10 +
drivers/gpu/nova-core/mctp.rs | 3 +
drivers/gpu/nova-core/nova_core.rs | 1 +
drivers/gpu/nova-core/vgpu.rs | 60 ++++++
drivers/misc/genwqe/card_base.c | 6 +-
.../net/ethernet/cavium/thunder/nic_main.c | 2 +-
drivers/net/ethernet/emulex/benet/be_main.c | 3 +-
.../net/ethernet/mellanox/mlx5/core/sriov.c | 3 +-
drivers/net/ethernet/sfc/ef10_sriov.c | 2 +-
drivers/pci/iov.c | 2 +-
drivers/vdpa/octeon_ep/octep_vdpa_main.c | 4 +-
include/linux/pci.h | 4 +-
rust/kernel/pci.rs | 6 +
25 files changed, 401 insertions(+), 69 deletions(-)
create mode 100644 drivers/gpu/nova-core/vgpu.rs
--
2.51.0