Message ID | 20230807205755.29579-1-brett.creeley@amd.com (mailing list archive) |
---|---|
Headers | show |
Series | pds-vfio-pci driver | expand |
> -----Original Message----- > From: Brett Creeley [mailto:brett.creeley@amd.com] > Sent: 07 August 2023 21:58 > To: kvm@vger.kernel.org; netdev@vger.kernel.org; > alex.williamson@redhat.com; jgg@nvidia.com; yishaih@nvidia.com; > Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>; > kevin.tian@intel.com > Cc: horms@kernel.org; brett.creeley@amd.com; shannon.nelson@amd.com > Subject: [PATCH v14 vfio 0/8] pds-vfio-pci driver > > This is a patchset for a new vendor specific VFIO driver > (pds-vfio-pci) for use with the AMD/Pensando Distributed Services > Card (DSC). This driver makes use of the pds_core driver. > > This driver will use the pds_core device's adminq as the VFIO > control path to the DSC. In order to make adminq calls, the VFIO > instance makes use of functions exported by the pds_core driver. > > In order to receive events from pds_core, the pds-vfio-pci driver > registers to a private notifier. This is needed for various events > that come from the device. > > An ASCII diagram of a VFIO instance looks something like this and can > be used with the VFIO subsystem to provide the VF device VFIO and live > migration support. > > .------. .-----------------------. > | QEMU |--| VM .-------------. | > '......' | | Eth VF | | > | | .-------------. | > | | | SR-IOV VF | > | > | | '-------------' | > | '------------||---------' > .--------------. || > |/dev/<vfio_fd>| || > '--------------' || > Host Userspace | || > =================================================== || > Host Kernel | || > .--------. || > |vfio-pci| || > '--------' || > .------------------. || || > | | exported API |<----+ || || > | '--------------| | || || > | | .--------------. || > | pds_core |--->| pds-vfio-pci | || > '------------------' | '--------------' || > || | || || > 09:00.0 notifier 09:00.1 || > == PCI ===============================================||===== > || || || > .----------. .----------. || > ,-----| PF |----------| VF |-------------------, > | '----------' |'----------' VF | > | DSC | data/control | > | | path | > ----------------------------------------------------------- > > The pds-vfio-pci driver is targeted to reside in drivers/vfio/pci/pds. > It makes use of and introduces new files in the common include/linux/pds > include directory. Looks fine to me. For series, Reviewed-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> Thanks, Shameer
> From: Brett Creeley <brett.creeley@amd.com> > Sent: Tuesday, August 8, 2023 4:58 AM > > This is a patchset for a new vendor specific VFIO driver > (pds-vfio-pci) for use with the AMD/Pensando Distributed Services > Card (DSC). This driver makes use of the pds_core driver. > > This driver will use the pds_core device's adminq as the VFIO > control path to the DSC. In order to make adminq calls, the VFIO > instance makes use of functions exported by the pds_core driver. > > In order to receive events from pds_core, the pds-vfio-pci driver > registers to a private notifier. This is needed for various events > that come from the device. > > An ASCII diagram of a VFIO instance looks something like this and can > be used with the VFIO subsystem to provide the VF device VFIO and live > migration support. > > .------. .-----------------------. > | QEMU |--| VM .-------------. | > '......' | | Eth VF | | > | | .-------------. | > | | | SR-IOV VF | | > | | '-------------' | > | '------------||---------' > .--------------. || > |/dev/<vfio_fd>| || > '--------------' || > Host Userspace | || > =================================================== || > Host Kernel | || > .--------. || > |vfio-pci| || > '--------' || > .------------------. || || > | | exported API |<----+ || || > | '--------------| | || || > | | .--------------. || > | pds_core |--->| pds-vfio-pci | || > '------------------' | '--------------' || > || | || || > 09:00.0 notifier 09:00.1 || > == PCI ===============================================||===== > || || || > .----------. .----------. || > ,-----| PF |----------| VF |-------------------, > | '----------' |'----------' VF | > | DSC | data/control | > | | path | > ----------------------------------------------------------- > > The pds-vfio-pci driver is targeted to reside in drivers/vfio/pci/pds. > It makes use of and introduces new files in the common include/linux/pds > include directory. > the series looks good now. Reviewed-by: Kevin Tian <kevin.tian@intel.com>
On Mon, 7 Aug 2023 13:57:47 -0700 Brett Creeley <brett.creeley@amd.com> wrote: > Brett Creeley (8): > vfio: Commonize combine_ranges for use in other VFIO drivers > vfio/pds: Initial support for pds VFIO driver > pds_core: Require callers of register/unregister to pass PF drvdata > vfio/pds: register with the pds_core PF > vfio/pds: Add VFIO live migration support > vfio/pds: Add support for dirty page tracking > vfio/pds: Add support for firmware recovery > vfio/pds: Add Kconfig and documentation > > .../ethernet/amd/pds_vfio_pci.rst | 79 +++ > .../device_drivers/ethernet/index.rst | 1 + > MAINTAINERS | 7 + > drivers/net/ethernet/amd/pds_core/auxbus.c | 20 +- > drivers/vfio/pci/Kconfig | 2 + > drivers/vfio/pci/Makefile | 2 + > drivers/vfio/pci/mlx5/cmd.c | 48 +- > drivers/vfio/pci/pds/Kconfig | 19 + > drivers/vfio/pci/pds/Makefile | 11 + > drivers/vfio/pci/pds/cmds.c | 509 ++++++++++++++++ > drivers/vfio/pci/pds/cmds.h | 25 + > drivers/vfio/pci/pds/dirty.c | 564 ++++++++++++++++++ > drivers/vfio/pci/pds/dirty.h | 39 ++ > drivers/vfio/pci/pds/lm.c | 434 ++++++++++++++ > drivers/vfio/pci/pds/lm.h | 41 ++ > drivers/vfio/pci/pds/pci_drv.c | 209 +++++++ > drivers/vfio/pci/pds/pci_drv.h | 9 + > drivers/vfio/pci/pds/vfio_dev.c | 227 +++++++ > drivers/vfio/pci/pds/vfio_dev.h | 39 ++ > drivers/vfio/vfio_main.c | 47 ++ > include/linux/pds/pds_adminq.h | 375 ++++++++++++ > include/linux/pds/pds_common.h | 9 +- > include/linux/vfio.h | 3 + > 23 files changed, 2654 insertions(+), 65 deletions(-) > create mode 100644 Documentation/networking/device_drivers/ethernet/amd/pds_vfio_pci.rst > create mode 100644 drivers/vfio/pci/pds/Kconfig > create mode 100644 drivers/vfio/pci/pds/Makefile > create mode 100644 drivers/vfio/pci/pds/cmds.c > create mode 100644 drivers/vfio/pci/pds/cmds.h > create mode 100644 drivers/vfio/pci/pds/dirty.c > create mode 100644 drivers/vfio/pci/pds/dirty.h > create mode 100644 drivers/vfio/pci/pds/lm.c > create mode 100644 drivers/vfio/pci/pds/lm.h > create mode 100644 drivers/vfio/pci/pds/pci_drv.c > create mode 100644 drivers/vfio/pci/pds/pci_drv.h > create mode 100644 drivers/vfio/pci/pds/vfio_dev.c > create mode 100644 drivers/vfio/pci/pds/vfio_dev.h > Applied to vfio next branch for v6.6. Thanks! Alex