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