Message ID | 164727326053.17467.1731353533389014796.stgit@omen (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | vfio-pci: Provide reviewers and acceptance criteria for vendor drivers | expand |
On 3/14/2022 6:09 PM, Alex Williamson wrote: > Vendor or 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. > > Cc: Jason Gunthorpe <jgg@nvidia.com> > Cc: Yishai Hadas <yishaih@nvidia.com> > Cc: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> > Cc: Kevin Tian <kevin.tian@intel.com> > Signed-off-by: Alex Williamson <alex.williamson@redhat.com> > --- > > Per the proposal here[1], I've collected those that volunteered and > those that I interpreted as showing interest (alpha by last name). For > those on the reviewers list below, please R-b/A-b to keep your name as a > reviewer. More volunteers are still welcome, please let me know > explicitly; R-b/A-b will not be used to automatically add reviewers but > are of course welcome. Thanks, You can add me as well to the reviewers list. Thanks, Yishai > Alex > > [1]https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fall%2F20220310134954.0df4bb12.alex.williamson%40redhat.com%2F&data=04%7C01%7Cyishaih%40nvidia.com%7C914efb56c83d4b8d1b4808da05d4fd37%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637828709598448083%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=OCpxnavNm2klUpkGRDX1CFb6ucO32jO4e%2BUADebVFbo%3D&reserved=0 > > .../vfio/vfio-pci-vendor-driver-acceptance.rst | 35 ++++++++++++++++++++ > MAINTAINERS | 9 +++++ > 2 files changed, 44 insertions(+) > create mode 100644 Documentation/vfio/vfio-pci-vendor-driver-acceptance.rst > > diff --git a/Documentation/vfio/vfio-pci-vendor-driver-acceptance.rst b/Documentation/vfio/vfio-pci-vendor-driver-acceptance.rst > new file mode 100644 > index 000000000000..3a108d748681 > --- /dev/null > +++ b/Documentation/vfio/vfio-pci-vendor-driver-acceptance.rst > @@ -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 such > +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/Acked-by/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. > diff --git a/MAINTAINERS b/MAINTAINERS > index 4322b5321891..7847b1492586 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -20314,6 +20314,15 @@ F: drivers/vfio/mdev/ > F: include/linux/mdev.h > F: samples/vfio-mdev/ > > +VFIO PCI VENDOR DRIVERS > +R: Jason Gunthorpe <jgg@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/vfio/vfio-pci-vendor-driver-acceptance.rst > +F: drivers/vfio/pci/*/ > + > VFIO PLATFORM DRIVER > M: Eric Auger <eric.auger@redhat.com> > L: kvm@vger.kernel.org > >
On Mon, 14 Mar 2022 21:07:01 +0200 Yishai Hadas <yishaih@nvidia.com> wrote: > On 3/14/2022 6:09 PM, Alex Williamson wrote: > > Vendor or 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. > > > > Cc: Jason Gunthorpe <jgg@nvidia.com> > > Cc: Yishai Hadas <yishaih@nvidia.com> > > Cc: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> > > Cc: Kevin Tian <kevin.tian@intel.com> > > Signed-off-by: Alex Williamson <alex.williamson@redhat.com> > > --- > > > > Per the proposal here[1], I've collected those that volunteered and > > those that I interpreted as showing interest (alpha by last name). For > > those on the reviewers list below, please R-b/A-b to keep your name as a > > reviewer. More volunteers are still welcome, please let me know > > explicitly; R-b/A-b will not be used to automatically add reviewers but > > are of course welcome. Thanks, > > You can add me as well to the reviewers list. Thanks, Yishai! v2 posted including you, please send ack or review. Thanks, Alex
Please stop the factually incorrect and misleading "vendor drivers" term. It is a driver for a specific piece of harware, which has absolutely nothing to do with a vendor and with an open spec can easily support devices from multiple vendors.
diff --git a/Documentation/vfio/vfio-pci-vendor-driver-acceptance.rst b/Documentation/vfio/vfio-pci-vendor-driver-acceptance.rst new file mode 100644 index 000000000000..3a108d748681 --- /dev/null +++ b/Documentation/vfio/vfio-pci-vendor-driver-acceptance.rst @@ -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 such +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/Acked-by/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. diff --git a/MAINTAINERS b/MAINTAINERS index 4322b5321891..7847b1492586 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -20314,6 +20314,15 @@ F: drivers/vfio/mdev/ F: include/linux/mdev.h F: samples/vfio-mdev/ +VFIO PCI VENDOR DRIVERS +R: Jason Gunthorpe <jgg@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/vfio/vfio-pci-vendor-driver-acceptance.rst +F: drivers/vfio/pci/*/ + VFIO PLATFORM DRIVER M: Eric Auger <eric.auger@redhat.com> L: kvm@vger.kernel.org
Vendor or 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. Cc: Jason Gunthorpe <jgg@nvidia.com> Cc: Yishai Hadas <yishaih@nvidia.com> Cc: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> Cc: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com> --- Per the proposal here[1], I've collected those that volunteered and those that I interpreted as showing interest (alpha by last name). For those on the reviewers list below, please R-b/A-b to keep your name as a reviewer. More volunteers are still welcome, please let me know explicitly; R-b/A-b will not be used to automatically add reviewers but are of course welcome. Thanks, Alex [1]https://lore.kernel.org/all/20220310134954.0df4bb12.alex.williamson@redhat.com/ .../vfio/vfio-pci-vendor-driver-acceptance.rst | 35 ++++++++++++++++++++ MAINTAINERS | 9 +++++ 2 files changed, 44 insertions(+) create mode 100644 Documentation/vfio/vfio-pci-vendor-driver-acceptance.rst