Skip to content

Commit

Permalink
vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF devices
Browse files Browse the repository at this point in the history
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
subsystem. 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.

Co-developed-by: Yahui Cao <yahui.cao@intel.com>
Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Signed-off-by: Xin Zeng <xin.zeng@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20240426064051.2859652-1-xin.zeng@intel.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
  • Loading branch information
XinIZeng authored and awilliam committed Apr 29, 2024
1 parent 4fefd69 commit bb20881
Show file tree
Hide file tree
Showing 6 changed files with 729 additions and 0 deletions.
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -23280,6 +23280,14 @@ L: kvm@vger.kernel.org
S: Maintained
F: drivers/vfio/platform/

VFIO QAT PCI DRIVER
M: Xin Zeng <xin.zeng@intel.com>
M: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
L: kvm@vger.kernel.org
L: qat-linux@intel.com
S: Supported
F: drivers/vfio/pci/qat/

VFIO VIRTIO PCI DRIVER
M: Yishai Hadas <yishaih@nvidia.com>
L: kvm@vger.kernel.org
Expand Down
2 changes: 2 additions & 0 deletions drivers/vfio/pci/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,6 @@ source "drivers/vfio/pci/virtio/Kconfig"

source "drivers/vfio/pci/nvgrace-gpu/Kconfig"

source "drivers/vfio/pci/qat/Kconfig"

endmenu
2 changes: 2 additions & 0 deletions drivers/vfio/pci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
12 changes: 12 additions & 0 deletions drivers/vfio/pci/qat/Kconfig
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions drivers/vfio/pci/qat/Makefile
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit bb20881

Please sign in to comment.