| From: |
| Zhi Wang <zhiw-AT-nvidia.com> |
| To: |
| <dakr-AT-kernel.org>, <acourbot-AT-nvidia.com> |
| Subject: |
| [PATCH v2 0/7] gpu: nova-core: boot GSP with vGPU enabled |
| Date: |
| Mon, 22 Jun 2026 22:43:46 +0300 |
| Message-ID: |
| <20260622194353.1308872-1-zhiw@nvidia.com> |
| Cc: |
| <airlied-AT-gmail.com>, <simona-AT-ffwll.ch>, <ojeda-AT-kernel.org>, <alex.gaynor-AT-gmail.com>, <boqun.feng-AT-gmail.com>, <gary-AT-garyguo.net>, <bjorn3_gh-AT-protonmail.com>, <lossin-AT-kernel.org>, <a.hindborg-AT-kernel.org>, <aliceryhl-AT-google.com>, <tmgross-AT-umich.edu>, <jhubbard-AT-nvidia.com>, <ecourtney-AT-nvidia.com>, <joelagnelf-AT-nvidia.com>, <apopple-AT-nvidia.com>, <cjia-AT-nvidia.com>, <smitra-AT-nvidia.com>, <kjaju-AT-nvidia.com>, <alkumar-AT-nvidia.com>, <ankita-AT-nvidia.com>, <aniketa-AT-nvidia.com>, <kwankhede-AT-nvidia.com>, <targupta-AT-nvidia.com>, <nova-gpu-AT-lists.linux.dev>, <linux-kernel-AT-vger.kernel.org>, <zhiwang-AT-kernel.org>, Zhi Wang <zhiw-AT-nvidia.com> |
| Archive-link: |
| Article |
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.211...
[2] https://lore.kernel.org/rust-for-linux/20260305190936.398...
[3] https://github.com/zhiwang-nvidia/nova-core/tree/zhi/nova...
[4] https://lore.kernel.org/all/20260622-nova-bootcontext-v2-...
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