Skip to content

Commit 1f5556e

Browse files
mwiniarsThomas Hellström
authored andcommitted
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 2e38c50) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
1 parent bd45d46 commit 1f5556e

6 files changed

Lines changed: 599 additions & 0 deletions

File tree

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27015,6 +27015,13 @@ L: virtualization@lists.linux.dev
2701527015
S: Maintained
2701627016
F: drivers/vfio/pci/virtio
2701727017

27018+
VFIO XE PCI DRIVER
27019+
M: Michał Winiarski <michal.winiarski@intel.com>
27020+
L: kvm@vger.kernel.org
27021+
L: intel-xe@lists.freedesktop.org
27022+
S: Supported
27023+
F: drivers/vfio/pci/xe
27024+
2701827025
VGA_SWITCHEROO
2701927026
R: Lukas Wunner <lukas@wunner.de>
2702027027
S: Maintained

drivers/vfio/pci/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,6 @@ source "drivers/vfio/pci/nvgrace-gpu/Kconfig"
6767

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

70+
source "drivers/vfio/pci/xe/Kconfig"
71+
7072
endmenu

drivers/vfio/pci/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ obj-$(CONFIG_VIRTIO_VFIO_PCI) += virtio/
1919
obj-$(CONFIG_NVGRACE_GPU_VFIO_PCI) += nvgrace-gpu/
2020

2121
obj-$(CONFIG_QAT_VFIO_PCI) += qat/
22+
23+
obj-$(CONFIG_XE_VFIO_PCI) += xe/

drivers/vfio/pci/xe/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 XE_VFIO_PCI
3+
tristate "VFIO support for Intel Graphics"
4+
depends on DRM_XE && PCI_IOV
5+
select VFIO_PCI_CORE
6+
help
7+
This option enables device specific VFIO driver variant for Intel Graphics.
8+
In addition to generic VFIO PCI functionality, it implements VFIO
9+
migration uAPI allowing userspace to enable migration for
10+
Intel Graphics SR-IOV Virtual Functions supported by the Xe driver.
11+
12+
If you don't know what to do here, say N.

drivers/vfio/pci/xe/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_XE_VFIO_PCI) += xe-vfio-pci.o
3+
xe-vfio-pci-y := main.o

0 commit comments

Comments
 (0)