Skip to content

Commit f621eb1

Browse files
author
Alex Williamson
committed
vfio-pci: Provide reviewers and acceptance criteria for variant drivers
Device specific extensions for devices exposed to userspace through the vfio-pci-core library open both new functionality and new risks. Here we attempt to provided formalized requirements and expectations to ensure that future drivers both collaborate in their interaction with existing host drivers, as well as receive additional reviews from community members with experience in this area. Acked-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> Reviewed-by: Yishai Hadas <yishaih@nvidia.com> Acked-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Acked-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/164736509088.181560.2887686123582116702.stgit@omen Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
1 parent 8b8e715 commit f621eb1

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

Documentation/driver-api/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ available subsections can be seen below.
103103
sync_file
104104
vfio-mediated-device
105105
vfio
106+
vfio-pci-device-specific-driver-acceptance
106107
xilinx/index
107108
xillybus
108109
zorro
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
Acceptance criteria for vfio-pci device specific driver variants
4+
================================================================
5+
6+
Overview
7+
--------
8+
The vfio-pci driver exists as a device agnostic driver using the
9+
system IOMMU and relying on the robustness of platform fault
10+
handling to provide isolated device access to userspace. While the
11+
vfio-pci driver does include some device specific support, further
12+
extensions for yet more advanced device specific features are not
13+
sustainable. The vfio-pci driver has therefore split out
14+
vfio-pci-core as a library that may be reused to implement features
15+
requiring device specific knowledge, ex. saving and loading device
16+
state for the purposes of supporting migration.
17+
18+
In support of such features, it's expected that some device specific
19+
variants may interact with parent devices (ex. SR-IOV PF in support of
20+
a user assigned VF) or other extensions that may not be otherwise
21+
accessible via the vfio-pci base driver. Authors of such drivers
22+
should be diligent not to create exploitable interfaces via these
23+
interactions or allow unchecked userspace data to have an effect
24+
beyond the scope of the assigned device.
25+
26+
New driver submissions are therefore requested to have approval via
27+
sign-off/ack/review/etc for any interactions with parent drivers.
28+
Additionally, drivers should make an attempt to provide sufficient
29+
documentation for reviewers to understand the device specific
30+
extensions, for example in the case of migration data, how is the
31+
device state composed and consumed, which portions are not otherwise
32+
available to the user via vfio-pci, what safeguards exist to validate
33+
the data, etc. To that extent, authors should additionally expect to
34+
require reviews from at least one of the listed reviewers, in addition
35+
to the overall vfio maintainer.

Documentation/maintainer/maintainer-entry-profile.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,4 @@ to do something different in the near future.
103103
../nvdimm/maintainer-entry-profile
104104
../riscv/patch-acceptance
105105
../driver-api/media/maintainer-entry-profile
106+
../driver-api/vfio-pci-device-specific-driver-acceptance

MAINTAINERS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20321,6 +20321,16 @@ F: drivers/vfio/mdev/
2032120321
F: include/linux/mdev.h
2032220322
F: samples/vfio-mdev/
2032320323

20324+
VFIO PCI DEVICE SPECIFIC DRIVERS
20325+
R: Jason Gunthorpe <jgg@nvidia.com>
20326+
R: Yishai Hadas <yishaih@nvidia.com>
20327+
R: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
20328+
R: Kevin Tian <kevin.tian@intel.com>
20329+
L: kvm@vger.kernel.org
20330+
S: Maintained
20331+
P: Documentation/driver-api/vfio-pci-device-specific-driver-acceptance.rst
20332+
F: drivers/vfio/pci/*/
20333+
2032420334
VFIO PLATFORM DRIVER
2032520335
M: Eric Auger <eric.auger@redhat.com>
2032620336
L: kvm@vger.kernel.org

0 commit comments

Comments
 (0)