vfio/xe: Add device specific vfio_pci driver variant for Intel graphics

In addition to generic VFIO PCI functionality, the driver implements
VFIO migration uAPI, allowing userspace to enable migration for Intel
Graphics SR-IOV Virtual Functions.
The driver binds to VF device and uses API exposed by Xe driver to
transfer the VF migration data under the control of PF device.

Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Alex Williamson <alex@shazbot.org>
Link: https://patch.msgid.link/20251127093934.1462188-5-michal.winiarski@intel.com
Link: https://lore.kernel.org/all/20251128125322.34edbeaf.alex@shazbot.org/
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
(cherry picked from commit 2e38c50ae4)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
This commit is contained in:
Michał Winiarski
2025-12-01 09:45:48 +01:00
committed by Thomas Hellström
parent bd45d46ffc
commit 1f5556ec8b
6 changed files with 599 additions and 0 deletions
+7
View File
@@ -27015,6 +27015,13 @@ L: virtualization@lists.linux.dev
S: Maintained
F: drivers/vfio/pci/virtio
VFIO XE PCI DRIVER
M: Michał Winiarski <michal.winiarski@intel.com>
L: kvm@vger.kernel.org
L: intel-xe@lists.freedesktop.org
S: Supported
F: drivers/vfio/pci/xe
VGA_SWITCHEROO
R: Lukas Wunner <lukas@wunner.de>
S: Maintained
+2
View File
@@ -67,4 +67,6 @@ source "drivers/vfio/pci/nvgrace-gpu/Kconfig"
source "drivers/vfio/pci/qat/Kconfig"
source "drivers/vfio/pci/xe/Kconfig"
endmenu
+2
View File
@@ -19,3 +19,5 @@ obj-$(CONFIG_VIRTIO_VFIO_PCI) += virtio/
obj-$(CONFIG_NVGRACE_GPU_VFIO_PCI) += nvgrace-gpu/
obj-$(CONFIG_QAT_VFIO_PCI) += qat/
obj-$(CONFIG_XE_VFIO_PCI) += xe/
+12
View File
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: GPL-2.0-only
config XE_VFIO_PCI
tristate "VFIO support for Intel Graphics"
depends on DRM_XE && PCI_IOV
select VFIO_PCI_CORE
help
This option enables device specific VFIO driver variant for Intel Graphics.
In addition to generic VFIO PCI functionality, it implements VFIO
migration uAPI allowing userspace to enable migration for
Intel Graphics SR-IOV Virtual Functions supported by the Xe driver.
If you don't know what to do here, say N.
+3
View File
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_XE_VFIO_PCI) += xe-vfio-pci.o
xe-vfio-pci-y := main.o
File diff suppressed because it is too large Load Diff