Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0
0002 
0003 Acceptance criteria for vfio-pci device specific driver variants
0004 ================================================================
0005 
0006 Overview
0007 --------
0008 The vfio-pci driver exists as a device agnostic driver using the
0009 system IOMMU and relying on the robustness of platform fault
0010 handling to provide isolated device access to userspace.  While the
0011 vfio-pci driver does include some device specific support, further
0012 extensions for yet more advanced device specific features are not
0013 sustainable.  The vfio-pci driver has therefore split out
0014 vfio-pci-core as a library that may be reused to implement features
0015 requiring device specific knowledge, ex. saving and loading device
0016 state for the purposes of supporting migration.
0017 
0018 In support of such features, it's expected that some device specific
0019 variants may interact with parent devices (ex. SR-IOV PF in support of
0020 a user assigned VF) or other extensions that may not be otherwise
0021 accessible via the vfio-pci base driver.  Authors of such drivers
0022 should be diligent not to create exploitable interfaces via these
0023 interactions or allow unchecked userspace data to have an effect
0024 beyond the scope of the assigned device.
0025 
0026 New driver submissions are therefore requested to have approval via
0027 sign-off/ack/review/etc for any interactions with parent drivers.
0028 Additionally, drivers should make an attempt to provide sufficient
0029 documentation for reviewers to understand the device specific
0030 extensions, for example in the case of migration data, how is the
0031 device state composed and consumed, which portions are not otherwise
0032 available to the user via vfio-pci, what safeguards exist to validate
0033 the data, etc.  To that extent, authors should additionally expect to
0034 require reviews from at least one of the listed reviewers, in addition
0035 to the overall vfio maintainer.