vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF devices
Subsystems (5)
PATCH v7 1/1 vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF devices
Add vfio pci variant driver for Intel QAT SR-IOV VF devices. This driver registers to the vfio subsystem through the interfaces exposed by the susbsystem. It follows the live migration protocol v2 defined in uapi/linux/vfio.h and interacts with Intel QAT PF driver through a set of interfaces defined in qat/qat_mig_dev.h to support live migration of Intel QAT VF devices.
This version only covers migration for Intel QAT GEN4 VF devices.
---
Changes in v7:
- Move some device specific details from the commit message into driver and add more comments around the P2P state handler (Alex)
V6:
https://lore.kernel.org/kvm/[email protected]
--- MAINTAINERS | 8 + drivers/vfio/pci/Kconfig | 2 + drivers/vfio/pci/Makefile | 2 + drivers/vfio/pci/qat/Kconfig | 12 + drivers/vfio/pci/qat/Makefile | 3 + drivers/vfio/pci/qat/main.c | 702 ++++++++++++++++++++++++++++++++++ 6 files changed, 729 insertions(+) create mode 100644 drivers/vfio/pci/qat/Kconfig create mode 100644 drivers/vfio/pci/qat/Makefile create mode 100644 drivers/vfio/pci/qat/main.c
MAINTAINERS +8 -0
@@ -23241,6 +23241,14 @@ L: [email protected] S: Maintained F: drivers/vfio/platform/ +VFIO QAT PCI DRIVER +M: Xin Zeng <[email protected]> +M: Giovanni Cabiddu <[email protected]> +L: [email protected] +L: [email protected] +S: Supported +F: drivers/vfio/pci/qat/ + VFIO VIRTIO PCI DRIVER M: Yishai Hadas <[email protected]> L: [email protected]
drivers/vfio/pci/Kconfig +2 -0
@@ -69,4 +69,6 @@ source "drivers/vfio/pci/virtio/Kconfig" source "drivers/vfio/pci/nvgrace-gpu/Kconfig" +source "drivers/vfio/pci/qat/Kconfig" + endmenu
drivers/vfio/pci/Makefile +2 -0
@@ -17,3 +17,5 @@ obj-$(CONFIG_PDS_VFIO_PCI) += pds/ obj-$(CONFIG_VIRTIO_VFIO_PCI) += virtio/ obj-$(CONFIG_NVGRACE_GPU_VFIO_PCI) += nvgrace-gpu/ + +obj-$(CONFIG_QAT_VFIO_PCI) += qat/
drivers/vfio/pci/qat/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0-only +config QAT_VFIO_PCI + tristate "VFIO support for QAT VF PCI devices" + select VFIO_PCI_CORE + depends on CRYPTO_DEV_QAT_4XXX + help + This provides migration support for Intel(R) QAT Virtual Function + using the VFIO framework. + + To compile this as a module, choose M here: the module + will be called qat_vfio_pci. If you don't know what to do here, + say N.
drivers/vfio/pci/qat/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0-only +obj-$(CONFIG_QAT_VFIO_PCI) += qat_vfio_pci.o +qat_vfio_pci-y := main.o
drivers/vfio/pci/qat/main.c new file +702 -0
702 lines not on this page · raw message
base-commit: f0bbfc391aa7eaa796f09ee40dd1cd78c6c81960
Signature · 1 line
2.18.2
Alex Williamson
AppliedQuoted 21 lines · On Fri, 26 Apr 2024 14:40:51 +0800 Xin Zeng <[email protected]> wrote:
Add vfio pci variant driver for Intel QAT SR-IOV VF devices. This driver registers to the vfio subsystem through the interfaces exposed by the susbsystem. It follows the live migration protocol v2 defined in
uapi/linux/vfio.hand interacts with Intel QAT PF driver through a set of interfaces defined inqat/qat_mig_dev.hto support live migration of Intel QAT VF devices.This version only covers migration for Intel QAT GEN4 VF devices.
Co-developed-by Yahui Cao <[email protected]>Signed-off-by Yahui Cao <[email protected]>Signed-off-by Xin Zeng <[email protected]>Reviewed-by Giovanni Cabiddu <[email protected]>Reviewed-by Kevin Tian <[email protected]>---
Changes in v7:
- Move some device specific details from the commit message into driver and add more comments around the P2P state handler (Alex)
Quoted 11 lines
--- MAINTAINERS | 8 + drivers/vfio/pci/Kconfig | 2 + drivers/vfio/pci/Makefile | 2 + drivers/vfio/pci/qat/Kconfig | 12 + drivers/vfio/pci/qat/Makefile | 3 + drivers/vfio/pci/qat/main.c | 702 ++++++++++++++++++++++++++++++++++ 6 files changed, 729 insertions(+) create mode 100644 drivers/vfio/pci/qat/Kconfig create mode 100644 drivers/vfio/pci/qat/Makefile create mode 100644 drivers/vfio/pci/qat/main.c
Applied to vfio next branch for v6.10. Thanks,
Alex