Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Song <xinmengs@nvidia.com>
To: <dakr@kernel.org>, <acourbot@nvidia.com>, <kvm@vger.kernel.org>,
	<rust-for-linux@vger.kernel.org>, <nova-gpu@lists.linux.dev>,
	<linux-pci@vger.kernel.org>
Cc: Simon Song <xinmengs@nvidia.com>, <alex@shazbot.org>,
	<jgg@nvidia.com>, <yishaih@nvidia.com>, <skolothumtho@nvidia.com>,
	<kevin.tian@intel.com>, <airlied@gmail.com>, <simona@ffwll.ch>,
	<ojeda@kernel.org>, <alex.gaynor@gmail.com>,
	<boqun.feng@gmail.com>, <gary@garyguo.net>,
	<bjorn3_gh@protonmail.com>, <lossin@kernel.org>,
	<a.hindborg@kernel.org>, <aliceryhl@google.com>,
	<tmgross@umich.edu>, <jhubbard@nvidia.com>,
	<ecourtney@nvidia.com>, <cjia@nvidia.com>, <smitra@nvidia.com>,
	<kjaju@nvidia.com>, <alkumar@nvidia.com>, <ankita@nvidia.com>,
	<aniketa@nvidia.com>, <kwankhede@nvidia.com>,
	<targupta@nvidia.com>, <linux-kernel@vger.kernel.org>,
	<zhiwang@kernel.org>, <zhiw@nvidia.com>, <boqun@kernel.org>,
	<daniel.almeida@collabora.com>, <tamird@kernel.org>,
	<work@onurozkan.dev>, <jgg@ziepe.ca>, <bhelgaas@google.com>,
	<kwilczynski@kernel.org>, <dri-devel@lists.freedesktop.org>,
	<peter@colberg.org>, "Liam R. Howlett" <liam@infradead.org>,
	<linux-mm@kvack.org>, Lorenzo Stoakes <ljs@kernel.org>
Subject: [PATCH v5 0/2] vfio/nova-vgpu: add the NVIDIA VFIO variant driver
Date: Fri, 4 Dec 2026 06:48:53 -0800	[thread overview]
Message-ID: <20261204144900.286240-1-xinmengs@nvidia.com> (raw)

This is v5 of the NVIDIA VFIO variant driver. Up to v4 these two patches
were patches 4 and 5 of "Rust VFIO PCI support and NVIDIA vGPU driver"
[1]. That series is now split in two. The first four patches, the Rust
VFIO PCI abstractions, are posted as [2]. This series carries the
driver and depends on [2].

Patch 1 publishes nova-core's typed SR-IOV PF interface. Patch 2 adds
the VFIO variant driver, which uses that interface to create, reset and
release vGPU instances while VFIO provides userspace access to the PCI
device.

This series depends on:
- v5 of the Rust VFIO PCI abstractions [2], and
- v6 of the vGPU manager series [3].

A branch with both and this series on top is at [4]. To bring up a vGPU,
userspace also has to assign a vGPU type to the VF. The tools do that
through nova-core's fwctl interface [5], which is not part of that
branch.

Changes since v4 [1]:
- Split from the Rust VFIO PCI abstractions [2] (Gary, Danilo).
- Patch 1 (v4 patch 4): rebase onto v6 of the vGPU manager series [3].
- Patch 2 (v4 patch 5):
  - Reset the vGPU instance in reset_prepare() again, before the PCI
    reset, as in v3. A VF FLR alone does not release the guest's
    resources in the firmware. Only the PF driver can request that, and
    the reason is documented at the call (Alex).
  - Refuse VFIO_DEVICE_IOEVENTFD for a vGPU, since the VFIO PCI core
    would write to the BAR without the BAR1 limit.
  - Use UserSlice for the config space read and write overrides (Gary,
    Danilo).
  - Use the RegionInfo accessors in get_region_info() (Gary).
  - Follow the abstraction changes: Registration::new() without the
    driver type, and the renamed lifetimes.

v4 patches 4 and 5 are now patches 1 and 2.

[1] https://lore.kernel.org/r/20261127224928.1511382-1-xinmengs@nvidia.com
[2] https://lore.kernel.org/all/20261204041727.4021092-1-xinmengs@nvidia.com/
[3] https://lore.kernel.org/all/cover.1796191007.git.alkumar@nvidia.com/
[4] https://github.com/xinmengsong/linux/tree/nova-vgpu-vfio-v5
[5] https://lore.kernel.org/all/cover.1796197508.git.alkumar@nvidia.com/

Danilo Krummrich (1):
  vfio/nova-vgpu: add the Rust VFIO variant driver

Zhi Wang (1):
  gpu: nova-core: publish typed SR-IOV PF APIs

 drivers/gpu/Makefile                    |  15 +-
 drivers/gpu/nova-core/driver.rs         |  34 +-
 drivers/gpu/nova-core/nova_core.rs      |   3 +-
 drivers/gpu/nova-core/vgpu.rs           |   1 -
 drivers/gpu/nova-core/vgpu/vgpu_api.rs  | 171 ++++++--
 drivers/vfio/pci/Kconfig                |   2 +
 drivers/vfio/pci/Makefile               |   2 +
 drivers/vfio/pci/nova-vgpu/Kconfig      |  20 +
 drivers/vfio/pci/nova-vgpu/Makefile     |   3 +
 drivers/vfio/pci/nova-vgpu/nova_vgpu.rs | 522 ++++++++++++++++++++++++
 rust/bindings/bindings_helper.h         |   1 +
 rust/kernel/vfio.rs                     |   3 +
 12 files changed, 732 insertions(+), 45 deletions(-)
 create mode 100644 drivers/vfio/pci/nova-vgpu/Kconfig
 create mode 100644 drivers/vfio/pci/nova-vgpu/Makefile
 create mode 100644 drivers/vfio/pci/nova-vgpu/nova_vgpu.rs


base-commit: 1b2c8b267ff3c9a8c83b7524debc637de02ee32b
prerequisite-patch-id: 6cfd7afd456e2122926d365321b00321036b9f2e
prerequisite-patch-id: 9228595f76dde48297670da5be99228c11fd917b
prerequisite-patch-id: 36f4f21082a9b20f5c75ce2e1a6fcaca39e2c1bf
prerequisite-patch-id: 3aa22f5e6eb0d188b6dc00bea385f1bc07aed2d6
prerequisite-patch-id: 741e15ad117e9018d6c568904cafe98e4f407acb
prerequisite-patch-id: 88d67b250d7c1b36afa23062ed3a712952e53490
prerequisite-patch-id: e8c13a777d612873aef5f8528b8360203981c3b3
prerequisite-patch-id: ca19c76a3af38d83a09e2b838225d5d22f3a58b1
prerequisite-patch-id: 4af23dd1b6074197be42ae98dbfb1214d020f5e5
prerequisite-patch-id: aa564955d07ecf6328d589ef175050933f12229d
prerequisite-patch-id: 2d77cbed5133696f05afffe0bbdf3cd2aeab9c30
prerequisite-patch-id: 7891b8799b904e8c587f7f68e5392ba936516d17
prerequisite-patch-id: 6e0a59e846fbb633b473c9b7e3c171ad859319d9
prerequisite-patch-id: dd31a51c79b2ee7a1870b3c5009f9fbe6e7b1d3d
prerequisite-patch-id: a45ddea8f025622742b378c3c5573498e66f39da
prerequisite-patch-id: 0cd47cf0b17fb9affc0099f7855d80c830c39e58
prerequisite-patch-id: 8bfda508149f5d50067673061fcd9987474a257f
prerequisite-patch-id: 9384489c5d19741b1cee28cb071f8f716fb0dc4f
prerequisite-patch-id: f29998e45c8372cc908d5237228f91d42c3e43ea
prerequisite-patch-id: b481e232431cb851412ffdf6a9b7a44f47bc29af
prerequisite-patch-id: 4be056b9e82b70bfece963bfd086581fb401dbcd
prerequisite-patch-id: 0b230677e51e12e58490d73225dcb713bc44a478
prerequisite-patch-id: a16a85dbc2894235193a72d59b259d2238bdb913
prerequisite-patch-id: 3f9088001ef25ffe240614642c41ad45a0624e99
prerequisite-patch-id: 7a489f3ec55dd259bc0fa65ae9d1b57189535b10
prerequisite-patch-id: 39d0211450a65d96a1db21b23ff99844ae318bb7
prerequisite-patch-id: 7b1390f798f69d262456afb050819bd446523b09
prerequisite-patch-id: 077ec934d669d3dd79a72e7b28f42304c0c54663
prerequisite-patch-id: ba4b3d4d72646658b5ce430b5c4e63ee5b048fcc
prerequisite-patch-id: 9844732646e998f81007b05b7d7e25cc628550eb
prerequisite-patch-id: 03a53e966692f58650e15b62ce0ba3be28333359
prerequisite-patch-id: 645d0c28e5ca61d1b6b0241508b933069d0368bb
prerequisite-patch-id: bf5955cc50e5ba2969f603ac580c82164c6d1f61
prerequisite-patch-id: e5d4407b295817aa64be5de87ec299be6f9be04d
prerequisite-patch-id: 48490c862395458dd1004abf6e9c2ceefca9236b
prerequisite-patch-id: b317b0f2b8520334b041b50bcac0d8b69673d834
prerequisite-patch-id: 35094e8dce6326b76dd43d54aef361ba58a32023
prerequisite-patch-id: 1fe49043278361d3c07b196b4bd3229aa6aa7537
-- 
2.43.7



             reply	other threads:[~2026-12-04 14:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 14:48 Simon Song [this message]
2026-12-04 14:48 ` [PATCH v5 1/2] gpu: nova-core: publish typed SR-IOV PF APIs Simon Song
2026-12-04 14:48 ` [PATCH v5 2/2] vfio/nova-vgpu: add the Rust VFIO variant driver Simon Song
2026-12-04 23:12   ` Alex Williamson
2026-12-04 23:28     ` Danilo Krummrich
2026-12-04 23:37       ` Alex Williamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261204144900.286240-1-xinmengs@nvidia.com \
    --to=xinmengs@nvidia.com \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=alex.gaynor@gmail.com \
    --cc=alex@shazbot.org \
    --cc=aliceryhl@google.com \
    --cc=alkumar@nvidia.com \
    --cc=aniketa@nvidia.com \
    --cc=ankita@nvidia.com \
    --cc=bhelgaas@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=boqun@kernel.org \
    --cc=cjia@nvidia.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ecourtney@nvidia.com \
    --cc=gary@garyguo.net \
    --cc=jgg@nvidia.com \
    --cc=jgg@ziepe.ca \
    --cc=jhubbard@nvidia.com \
    --cc=kevin.tian@intel.com \
    --cc=kjaju@nvidia.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwankhede@nvidia.com \
    --cc=kwilczynski@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=ljs@kernel.org \
    --cc=lossin@kernel.org \
    --cc=nova-gpu@lists.linux.dev \
    --cc=ojeda@kernel.org \
    --cc=peter@colberg.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=skolothumtho@nvidia.com \
    --cc=smitra@nvidia.com \
    --cc=tamird@kernel.org \
    --cc=targupta@nvidia.com \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    --cc=yishaih@nvidia.com \
    --cc=zhiw@nvidia.com \
    --cc=zhiwang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox