Skip to content

Commit bb20881

Browse files
XinIZengawilliam
authored andcommitted
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 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>
1 parent 4fefd69 commit bb20881

File tree

6 files changed

+729
-0
lines changed

6 files changed

+729
-0
lines changed

MAINTAINERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23280,6 +23280,14 @@ L: kvm@vger.kernel.org
2328023280
S: Maintained
2328123281
F: drivers/vfio/platform/
2328223282

23283+
VFIO QAT PCI DRIVER
23284+
M: Xin Zeng <xin.zeng@intel.com>
23285+
M: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
23286+
L: kvm@vger.kernel.org
23287+
L: qat-linux@intel.com
23288+
S: Supported
23289+
F: drivers/vfio/pci/qat/
23290+
2328323291
VFIO VIRTIO PCI DRIVER
2328423292
M: Yishai Hadas <yishaih@nvidia.com>
2328523293
L: kvm@vger.kernel.org

drivers/vfio/pci/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,6 @@ source "drivers/vfio/pci/virtio/Kconfig"
6969

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

72+
source "drivers/vfio/pci/qat/Kconfig"
73+
7274
endmenu

drivers/vfio/pci/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ obj-$(CONFIG_PDS_VFIO_PCI) += pds/
1717
obj-$(CONFIG_VIRTIO_VFIO_PCI) += virtio/
1818

1919
obj-$(CONFIG_NVGRACE_GPU_VFIO_PCI) += nvgrace-gpu/
20+
21+
obj-$(CONFIG_QAT_VFIO_PCI) += qat/

drivers/vfio/pci/qat/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
config QAT_VFIO_PCI
3+
tristate "VFIO support for QAT VF PCI devices"
4+
select VFIO_PCI_CORE
5+
depends on CRYPTO_DEV_QAT_4XXX
6+
help
7+
This provides migration support for Intel(R) QAT Virtual Function
8+
using the VFIO framework.
9+
10+
To compile this as a module, choose M here: the module
11+
will be called qat_vfio_pci. If you don't know what to do here,
12+
say N.

drivers/vfio/pci/qat/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
obj-$(CONFIG_QAT_VFIO_PCI) += qat_vfio_pci.o
3+
qat_vfio_pci-y := main.o

0 commit comments

Comments
 (0)