vfio-pci: Provide reviewers and acceptance criteria for variant drivers
authorAlex Williamson <alex.williamson@redhat.com>
Tue, 15 Mar 2022 17:29:57 +0000 (11:29 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 17 Mar 2022 15:57:11 +0000 (09:57 -0600)
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>
Documentation/driver-api/index.rst
Documentation/driver-api/vfio-pci-device-specific-driver-acceptance.rst [new file with mode: 0644]
Documentation/maintainer/maintainer-entry-profile.rst
MAINTAINERS

index c57c609..a7b0223 100644 (file)
@@ -103,6 +103,7 @@ available subsections can be seen below.
    sync_file
    vfio-mediated-device
    vfio
+   vfio-pci-device-specific-driver-acceptance
    xilinx/index
    xillybus
    zorro
diff --git a/Documentation/driver-api/vfio-pci-device-specific-driver-acceptance.rst b/Documentation/driver-api/vfio-pci-device-specific-driver-acceptance.rst
new file mode 100644 (file)
index 0000000..b7b99b8
--- /dev/null
@@ -0,0 +1,35 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+Acceptance criteria for vfio-pci device specific driver variants
+================================================================
+
+Overview
+--------
+The vfio-pci driver exists as a device agnostic driver using the
+system IOMMU and relying on the robustness of platform fault
+handling to provide isolated device access to userspace.  While the
+vfio-pci driver does include some device specific support, further
+extensions for yet more advanced device specific features are not
+sustainable.  The vfio-pci driver has therefore split out
+vfio-pci-core as a library that may be reused to implement features
+requiring device specific knowledge, ex. saving and loading device
+state for the purposes of supporting migration.
+
+In support of such features, it's expected that some device specific
+variants may interact with parent devices (ex. SR-IOV PF in support of
+a user assigned VF) or other extensions that may not be otherwise
+accessible via the vfio-pci base driver.  Authors of such drivers
+should be diligent not to create exploitable interfaces via these
+interactions or allow unchecked userspace data to have an effect
+beyond the scope of the assigned device.
+
+New driver submissions are therefore requested to have approval via
+sign-off/ack/review/etc for any interactions with parent drivers.
+Additionally, drivers should make an attempt to provide sufficient
+documentation for reviewers to understand the device specific
+extensions, for example in the case of migration data, how is the
+device state composed and consumed, which portions are not otherwise
+available to the user via vfio-pci, what safeguards exist to validate
+the data, etc.  To that extent, authors should additionally expect to
+require reviews from at least one of the listed reviewers, in addition
+to the overall vfio maintainer.
index 5d5cc3a..93b2ae6 100644 (file)
@@ -103,3 +103,4 @@ to do something different in the near future.
    ../nvdimm/maintainer-entry-profile
    ../riscv/patch-acceptance
    ../driver-api/media/maintainer-entry-profile
+   ../driver-api/vfio-pci-device-specific-driver-acceptance
index a6f84f6..e779888 100644 (file)
@@ -20321,6 +20321,16 @@ F:     drivers/vfio/mdev/
 F:     include/linux/mdev.h
 F:     samples/vfio-mdev/
 
+VFIO PCI DEVICE SPECIFIC DRIVERS
+R:     Jason Gunthorpe <jgg@nvidia.com>
+R:     Yishai Hadas <yishaih@nvidia.com>
+R:     Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
+R:     Kevin Tian <kevin.tian@intel.com>
+L:     kvm@vger.kernel.org
+S:     Maintained
+P:     Documentation/driver-api/vfio-pci-device-specific-driver-acceptance.rst
+F:     drivers/vfio/pci/*/
+
 VFIO PLATFORM DRIVER
 M:     Eric Auger <eric.auger@redhat.com>
 L:     kvm@vger.kernel.org