Re: [PATCH] vfio: Allow untainted use of driver_override

From: Creeley, Brett

Date: Wed Nov 18 2026 - 19:12:57 EST




On 11/18/2026 3:56 PM, Alex Williamson wrote:
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


Driver overrides are the standard mechanism for binding vfio drivers
to devices. With the introduction of the support_driver_override flag
in the core driver struct, it's now required for drivers to declare
themselves as driver_override compatible, otherwise driver_override
bindings will be denied or generate a kernel taint.

Set the support_driver_override flag on the driver struct across all
vfio drivers.

Cc: Yishai Hadas <yishaih@xxxxxxxxxx>
Cc: Longfang Liu <liulongfang@xxxxxxxxxx>
Cc: Ankit Agrawal <ankita@xxxxxxxxxx>
Cc: Brett Creeley <brett.creeley@xxxxxxx>
Cc: Giovanni Cabiddu <giovanni.cabiddu@xxxxxxxxx>
Cc: Michał Winiarski <michal.winiarski@xxxxxxxxx>
Cc: Julian Ruess <julianr@xxxxxxxxxxxxx>
Cc: Nipun Gupta <nipun.gupta@xxxxxxx>
Cc: Nikhil Agarwal <nikhil.agarwal@xxxxxxx>
Cc: Eric Auger <eric.auger@xxxxxxxxxx>
Cc: Mostafa Saleh <smostafa@xxxxxxxxxx>
Cc: Pranjal Shrivastava <praan@xxxxxxxxxx>
Cc: Ioana Ciornei <ioana.ciornei@xxxxxxx>
Cc: qat-linux@xxxxxxxxx
Cc: virtualization@xxxxxxxxxxxxxxx
Cc: intel-xe@xxxxxxxxxxxxxxxxxxxxx
Cc: kvm@xxxxxxxxxxxxxxx
Signed-off-by: Alex Williamson <alex@xxxxxxxxxxx>
---

Uwe, this should cover all the vfio drivers that expect to use
driver_override. Thanks,

Alex

drivers/vfio/cdx/main.c | 1 +
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 1 +
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 3 ++-
drivers/vfio/pci/ism/main.c | 3 ++-
drivers/vfio/pci/mlx5/main.c | 3 ++-
drivers/vfio/pci/nvgrace-gpu/main.c | 3 ++-
drivers/vfio/pci/pds/pci_drv.c | 3 ++-
drivers/vfio/pci/qat/main.c | 3 ++-
drivers/vfio/pci/vfio_pci.c | 3 ++-
drivers/vfio/pci/virtio/main.c | 3 ++-
drivers/vfio/pci/xe/main.c | 3 ++-
drivers/vfio/platform/vfio_amba.c | 1 +
drivers/vfio/platform/vfio_platform.c | 1 +
13 files changed, 22 insertions(+), 9 deletions(-)

<...>

diff --git a/drivers/vfio/pci/pds/pci_drv.c b/drivers/vfio/pci/pds/pci_drv.c
index cf7e33d4d17b..1fcef987f1b0 100644
--- a/drivers/vfio/pci/pds/pci_drv.c
+++ b/drivers/vfio/pci/pds/pci_drv.c
@@ -184,7 +184,8 @@ static struct pci_driver pds_vfio_pci_driver = {
.id_table = pds_vfio_pci_table,
.probe = pds_vfio_pci_probe,
.remove = pds_vfio_pci_remove,
- .driver = { .pm = pm_ptr(&pds_vfio_pm_ops) },
+ .driver = { .pm = pm_ptr(&pds_vfio_pm_ops),
+ .support_driver_override = true },
.err_handler = &pds_vfio_pci_err_handlers,
.driver_managed_dma = true,
};
LGTM.

Reviewed-by: Brett Creeley <brett.creeley@xxxxxxx>