Re: [PATCH v3 28/28] vfio/xe: Add device specific vfio_pci driver variant for Intel graphics
From: Winiarski, Michal
Date: Fri Nov 07 2025 - 04:55:01 EST
On Fri, Nov 07, 2025 at 10:38:05AM +0100, Muqthyar Ahmed, Syed Abdul wrote:
>
>
> > -----Original Message-----
> > From: Intel-xe <intel-xe-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Michał
> > Winiarski
> > Sent: Friday, October 31, 2025 2:02 AM
> > To: Alex Williamson <alex@xxxxxxxxxxx>; De Marchi, Lucas
> > <lucas.demarchi@xxxxxxxxx>; Thomas Hellström
> > <thomas.hellstrom@xxxxxxxxxxxxxxx>; Vivi, Rodrigo <rodrigo.vivi@xxxxxxxxx>;
> > Jason Gunthorpe <jgg@xxxxxxxx>; Yishai Hadas <yishaih@xxxxxxxxxx>; Tian,
> > Kevin <kevin.tian@xxxxxxxxx>; Shameer Kolothum
> > <skolothumtho@xxxxxxxxxx>; intel-xe@xxxxxxxxxxxxxxxxxxxxx; linux-
> > kernel@xxxxxxxxxxxxxxx; kvm@xxxxxxxxxxxxxxx; Brost, Matthew
> > <matthew.brost@xxxxxxxxx>; Wajdeczko, Michal
> > <Michal.Wajdeczko@xxxxxxxxx>
> > Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx; Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>;
> > Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>; Tvrtko Ursulin
> > <tursulin@xxxxxxxxxxx>; David Airlie <airlied@xxxxxxxxx>; Simona Vetter
> > <simona@xxxxxxxx>; Laguna, Lukasz <lukasz.laguna@xxxxxxxxx>; Christoph
> > Hellwig <hch@xxxxxxxxxxxxx>; Winiarski, Michal
> > <michal.winiarski@xxxxxxxxx>
> > Subject: [PATCH v3 28/28] 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 bound to PF
> > device to control VF device state and transfer the migration data.
> >
> > Signed-off-by: Michał Winiarski <michal.winiarski@xxxxxxxxx>
> > ---
> > MAINTAINERS | 7 +
> > drivers/vfio/pci/Kconfig | 2 +
> > drivers/vfio/pci/Makefile | 2 +
> > drivers/vfio/pci/xe/Kconfig | 12 +
> > drivers/vfio/pci/xe/Makefile | 3 +
> > drivers/vfio/pci/xe/main.c | 552 +++++++++++++++++++++++++++++++++++
> > 6 files changed, 578 insertions(+)
> > create mode 100644 drivers/vfio/pci/xe/Kconfig create mode 100644
> > drivers/vfio/pci/xe/Makefile create mode 100644 drivers/vfio/pci/xe/main.c
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index b890ff265f03f..d73348c5f3f3e 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -27008,6 +27008,13 @@ L: virtualization@xxxxxxxxxxxxxxx
> > S: Maintained
> > F: drivers/vfio/pci/virtio
> >
> > +VFIO XE PCI DRIVER
> > +M: Michał Winiarski <michal.winiarski@xxxxxxxxx>
> > +L: kvm@xxxxxxxxxxxxxxx
> > +L: intel-xe@xxxxxxxxxxxxxxxxxxxxx
> > +S: Supported
> > +F: drivers/vfio/pci/xe
> > +
> > VGA_SWITCHEROO
> > R: Lukas Wunner <lukas@xxxxxxxxx>
> > S: Maintained
> > diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig index
> > 2b0172f546652..c100f0ab87f2d 100644
> > --- a/drivers/vfio/pci/Kconfig
> > +++ b/drivers/vfio/pci/Kconfig
> > @@ -67,4 +67,6 @@ source "drivers/vfio/pci/nvgrace-gpu/Kconfig"
> >
> > source "drivers/vfio/pci/qat/Kconfig"
> >
> > +source "drivers/vfio/pci/xe/Kconfig"
> > +
> > endmenu
> > diff --git a/drivers/vfio/pci/Makefile b/drivers/vfio/pci/Makefile index
> > cf00c0a7e55c8..f5d46aa9347b9 100644
> > --- a/drivers/vfio/pci/Makefile
> > +++ b/drivers/vfio/pci/Makefile
> > @@ -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/
> > diff --git a/drivers/vfio/pci/xe/Kconfig b/drivers/vfio/pci/xe/Kconfig new file
> > mode 100644 index 0000000000000..787be88268685
> > --- /dev/null
> > +++ b/drivers/vfio/pci/xe/Kconfig
> > @@ -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
> > + select VFIO_PCI_CORE
> Shall we make it default enabled with "default m " so that config gets enabled for first timers and no need to enable explicitly.
No. The disable-by-default rule is intentional.
VFIO driver variants are generally not part of "Hardware or
infrastructure that everybody expects, such as CONFIG_NET or
CONFIG_BLOCK".
There's nothing about xe-vfio-pci that would make it an exception.
For more information, see:
https://docs.kernel.org/kbuild/kconfig-language.html#menu-attributes
Thanks,
-Michał