All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 16:22 [PATCH] driver core: Disable driver overriding by default Danilo Krummrich
@ 2026-11-18 23:56 ` Alex Williamson
  2026-11-19  0:09   ` sashiko-bot
                     ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Alex Williamson @ 2026-11-18 23:56 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Alex Williamson, Greg Kroah-Hartman, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Rafael J . Wysocki, Danilo Krummrich, Johan Hovold,
	Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	David Lechner, Armin Wolf, Thierry Reding, Mike Rapoport,
	Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang, linux-doc,
	linux-kernel, driver-core, linux-trace-kernel, Mark Brown,
	Bjorn Helgaas, Yishai Hadas, Longfang Liu, Ankit Agrawal,
	Brett Creeley, Giovanni Cabiddu, Michał Winiarski,
	Julian Ruess, Nipun Gupta, Nikhil Agarwal, Eric Auger,
	Mostafa Saleh, Pranjal Shrivastava, Ioana Ciornei, qat-linux,
	virtualization, intel-xe, kvm

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@nvidia.com>
Cc: Longfang Liu <liulongfang@huawei.com>
Cc: Ankit Agrawal <ankita@nvidia.com>
Cc: Brett Creeley <brett.creeley@amd.com>
Cc: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Julian Ruess <julianr@linux.ibm.com>
Cc: Nipun Gupta <nipun.gupta@amd.com>
Cc: Nikhil Agarwal <nikhil.agarwal@amd.com>
Cc: Eric Auger <eric.auger@redhat.com>
Cc: Mostafa Saleh <smostafa@google.com>
Cc: Pranjal Shrivastava <praan@google.com>
Cc: Ioana Ciornei <ioana.ciornei@nxp.com>
Cc: qat-linux@intel.com
Cc: virtualization@lists.linux.dev
Cc: intel-xe@lists.freedesktop.org
Cc: kvm@vger.kernel.org
Signed-off-by: Alex Williamson <alex@shazbot.org>
---

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/cdx/main.c b/drivers/vfio/cdx/main.c
index 28dc8c825600..fb7679bf92fd 100644
--- a/drivers/vfio/cdx/main.c
+++ b/drivers/vfio/cdx/main.c
@@ -358,6 +358,7 @@ static struct cdx_driver vfio_cdx_driver = {
 	.match_id_table	= vfio_cdx_table,
 	.driver	= {
 		.name	= "vfio-cdx",
+		.support_driver_override = true,
 	},
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
index 15b05b8c0c90..1603f81e0257 100644
--- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
+++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
@@ -597,6 +597,7 @@ static struct fsl_mc_driver vfio_fsl_mc_driver = {
 	.remove		= vfio_fsl_mc_remove,
 	.driver	= {
 		.name	= "vfio-fsl-mc",
+		.support_driver_override = true,
 	},
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
index c82c59246a3f..5c56aff8db01 100644
--- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
+++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
@@ -1737,7 +1737,8 @@ static struct pci_driver hisi_acc_vfio_pci_driver = {
 	.id_table = hisi_acc_vfio_pci_table,
 	.probe = hisi_acc_vfio_pci_probe,
 	.remove = hisi_acc_vfio_pci_remove,
-	.driver = { .pm = pm_ptr(&hisi_acc_vf_pm_ops) },
+	.driver = { .pm = pm_ptr(&hisi_acc_vf_pm_ops),
+		    .support_driver_override = true },
 	.err_handler = &hisi_acc_vf_err_handlers,
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/pci/ism/main.c b/drivers/vfio/pci/ism/main.c
index cce3bdf1f070..263b377e87c4 100644
--- a/drivers/vfio/pci/ism/main.c
+++ b/drivers/vfio/pci/ism/main.c
@@ -399,7 +399,8 @@ static struct pci_driver ism_vfio_pci_driver = {
 	.id_table = ism_device_table,
 	.probe = ism_vfio_pci_probe,
 	.remove = ism_vfio_pci_remove,
-	.driver	= { .pm = pm_ptr(&ism_vfio_pm_ops) },
+	.driver	= { .pm = pm_ptr(&ism_vfio_pm_ops),
+		    .support_driver_override = true },
 	.err_handler = &ism_vfio_err_handlers,
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/pci/mlx5/main.c b/drivers/vfio/pci/mlx5/main.c
index 18a6d224b1fd..63c89e461be8 100644
--- a/drivers/vfio/pci/mlx5/main.c
+++ b/drivers/vfio/pci/mlx5/main.c
@@ -1451,7 +1451,8 @@ static struct pci_driver mlx5vf_pci_driver = {
 	.id_table = mlx5vf_pci_table,
 	.probe = mlx5vf_pci_probe,
 	.remove = mlx5vf_pci_remove,
-	.driver	= { .pm = pm_ptr(&mlx5vf_pm_ops) },
+	.driver	= { .pm = pm_ptr(&mlx5vf_pm_ops),
+		    .support_driver_override = true },
 	.err_handler = &mlx5vf_err_handlers,
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/pci/nvgrace-gpu/main.c b/drivers/vfio/pci/nvgrace-gpu/main.c
index 5ddec340b73b..946da32c61ff 100644
--- a/drivers/vfio/pci/nvgrace-gpu/main.c
+++ b/drivers/vfio/pci/nvgrace-gpu/main.c
@@ -1438,7 +1438,8 @@ static struct pci_driver nvgrace_gpu_vfio_pci_driver = {
 	.id_table = nvgrace_gpu_vfio_pci_table,
 	.probe = nvgrace_gpu_probe,
 	.remove = nvgrace_gpu_remove,
-	.driver = { .pm = pm_ptr(&nvgrace_gpu_pm_ops) },
+	.driver = { .pm = pm_ptr(&nvgrace_gpu_pm_ops),
+		    .support_driver_override = true },
 	.err_handler = &nvgrace_gpu_vfio_pci_err_handlers,
 	.driver_managed_dma = true,
 };
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,
 };
diff --git a/drivers/vfio/pci/qat/main.c b/drivers/vfio/pci/qat/main.c
index 69448fa57df4..8a616f9b6494 100644
--- a/drivers/vfio/pci/qat/main.c
+++ b/drivers/vfio/pci/qat/main.c
@@ -695,7 +695,8 @@ static struct pci_driver qat_vf_vfio_pci_driver = {
 	.id_table = qat_vf_vfio_pci_table,
 	.probe = qat_vf_vfio_pci_probe,
 	.remove = qat_vf_vfio_pci_remove,
-	.driver	= { .pm = pm_ptr(&qat_vf_pm_ops) },
+	.driver	= { .pm = pm_ptr(&qat_vf_pm_ops),
+		    .support_driver_override = true },
 	.err_handler = &qat_vf_err_handlers,
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index e7c012febe91..fde2c3fc88eb 100644
--- a/drivers/vfio/pci/vfio_pci.c
+++ b/drivers/vfio/pci/vfio_pci.c
@@ -260,7 +260,8 @@ static struct pci_driver vfio_pci_driver = {
 	.remove			= vfio_pci_remove,
 	.sriov_configure	= vfio_pci_sriov_configure,
 	.err_handler		= &vfio_pci_err_handlers,
-	.driver		= { .pm = pm_ptr(&vfio_pci_pm_ops) },
+	.driver		= { .pm = pm_ptr(&vfio_pci_pm_ops),
+			    .support_driver_override = true },
 	.driver_managed_dma	= true,
 };
 
diff --git a/drivers/vfio/pci/virtio/main.c b/drivers/vfio/pci/virtio/main.c
index 123ff5193812..1e02a8fd4a61 100644
--- a/drivers/vfio/pci/virtio/main.c
+++ b/drivers/vfio/pci/virtio/main.c
@@ -222,7 +222,8 @@ static struct pci_driver virtiovf_pci_driver = {
 	.id_table = virtiovf_pci_table,
 	.probe = virtiovf_pci_probe,
 	.remove = virtiovf_pci_remove,
-	.driver = { .pm = pm_ptr(&virtiovf_pm_ops) },
+	.driver = { .pm = pm_ptr(&virtiovf_pm_ops),
+		    .support_driver_override = true },
 	.err_handler = &virtiovf_err_handlers,
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/pci/xe/main.c b/drivers/vfio/pci/xe/main.c
index 7dab3e024aa8..e0ab61f604de 100644
--- a/drivers/vfio/pci/xe/main.c
+++ b/drivers/vfio/pci/xe/main.c
@@ -592,7 +592,8 @@ static struct pci_driver xe_vfio_pci_driver = {
 	.id_table = xe_vfio_pci_table,
 	.probe = xe_vfio_pci_probe,
 	.remove = xe_vfio_pci_remove,
-	.driver = { .pm = pm_ptr(&xe_vfio_pm_ops) },
+	.driver = { .pm = pm_ptr(&xe_vfio_pm_ops),
+		    .support_driver_override = true },
 	.err_handler = &xe_vfio_pci_err_handlers,
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/platform/vfio_amba.c b/drivers/vfio/platform/vfio_amba.c
index fa754f203b2d..2c87caf1b7f7 100644
--- a/drivers/vfio/platform/vfio_amba.c
+++ b/drivers/vfio/platform/vfio_amba.c
@@ -137,6 +137,7 @@ static struct amba_driver vfio_amba_driver = {
 	.id_table = vfio_amba_ids,
 	.drv = {
 		.name = "vfio-amba",
+		.support_driver_override = true,
 	},
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/platform/vfio_platform.c b/drivers/vfio/platform/vfio_platform.c
index a4d3ace3e02d..93d06032cdde 100644
--- a/drivers/vfio/platform/vfio_platform.c
+++ b/drivers/vfio/platform/vfio_platform.c
@@ -116,6 +116,7 @@ static struct platform_driver vfio_platform_driver = {
 	.remove		= vfio_platform_remove,
 	.driver	= {
 		.name	= "vfio-platform",
+		.support_driver_override = true,
 	},
 	.driver_managed_dma = true,
 };
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 23:56 ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
@ 2026-11-19  0:09   ` sashiko-bot
  2026-11-19  0:12   ` Creeley, Brett
                     ` (6 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: sashiko-bot @ 2026-11-19  0:09 UTC (permalink / raw)
  To: Alex Williamson
  Cc: linux-trace-kernel, virtualization, intel-xe, kvm,
	Michael S. Tsirkin, Eugenio Perez

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] vfio: build failure due to missing support_driver_override in
  device_driver
- [Medium] vfio: missing support_driver_override on s390 vfio_ccw and
  vfio_ap drivers
--

commit e1a4bdaaf4e34e9a150096261c67507d2bd63625
Author: Alex Williamson <alex@shazbot.org>

vfio: Allow untainted use of driver_override

This commit sets the support_driver_override flag on the embedded device
driver structures across vfio drivers so that binding devices via
driver_override continues to work without tainting the kernel.

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

[Severity: Medium]
Should the s390 vfio drivers outside drivers/vfio/ also set
support_driver_override?

Both vfio_ccw_sch_driver in drivers/s390/cio/vfio_ccw_drv.c and
vfio_ap_drv in drivers/s390/crypto/vfio_ap_drv.c bind to devices via
device_match_driver_override() on css_bus_type and ap_bus_type, so
omitting them will deny or taint driver_override bindings for vfio_ccw
subchannels and vfio_ap queues.

> diff --git a/drivers/vfio/cdx/main.c b/drivers/vfio/cdx/main.c
> index 28dc8c8256006..fb7679bf92fd3 100644
> --- a/drivers/vfio/cdx/main.c
> +++ b/drivers/vfio/cdx/main.c
> @@ -358,6 +358,7 @@ static struct cdx_driver vfio_cdx_driver = {
>  	.match_id_table	= vfio_cdx_table,
>  	.driver	= {
>  		.name	= "vfio-cdx",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };

[Severity: High]
Is this missing the prerequisite driver-core patch that adds
support_driver_override to struct device_driver?  In this tree, struct
device_driver in include/linux/device/driver.h has no
support_driver_override member, so building any of the 13 modified vfio
drivers fails with an unknown field in initializer error.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261118235645.2907908-2-alex@shazbot.org?part=1

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 23:56 ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
  2026-11-19  0:09   ` sashiko-bot
@ 2026-11-19  0:12   ` Creeley, Brett
  2026-11-19 14:56   ` Mostafa Saleh
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Creeley, Brett @ 2026-11-19  0:12 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: Greg Kroah-Hartman, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	Rafael J . Wysocki, Danilo Krummrich, Johan Hovold,
	Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	David Lechner, Armin Wolf, Thierry Reding, Mike Rapoport,
	Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang, linux-doc,
	linux-kernel, driver-core, linux-trace-kernel, Mark Brown,
	Bjorn Helgaas, Yishai Hadas, Longfang Liu, Ankit Agrawal,
	Brett Creeley, Giovanni Cabiddu, Michał Winiarski,
	Julian Ruess, Nipun Gupta, Nikhil Agarwal, Eric Auger,
	Mostafa Saleh, Pranjal Shrivastava, Ioana Ciornei, qat-linux,
	virtualization, intel-xe, kvm



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@nvidia.com>
> Cc: Longfang Liu <liulongfang@huawei.com>
> Cc: Ankit Agrawal <ankita@nvidia.com>
> Cc: Brett Creeley <brett.creeley@amd.com>
> Cc: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Julian Ruess <julianr@linux.ibm.com>
> Cc: Nipun Gupta <nipun.gupta@amd.com>
> Cc: Nikhil Agarwal <nikhil.agarwal@amd.com>
> Cc: Eric Auger <eric.auger@redhat.com>
> Cc: Mostafa Saleh <smostafa@google.com>
> Cc: Pranjal Shrivastava <praan@google.com>
> Cc: Ioana Ciornei <ioana.ciornei@nxp.com>
> Cc: qat-linux@intel.com
> Cc: virtualization@lists.linux.dev
> Cc: intel-xe@lists.freedesktop.org
> Cc: kvm@vger.kernel.org
> Signed-off-by: Alex Williamson <alex@shazbot.org>
> ---
>
> 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@amd.com>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 23:56 ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
  2026-11-19  0:09   ` sashiko-bot
  2026-11-19  0:12   ` Creeley, Brett
@ 2026-11-19 14:56   ` Mostafa Saleh
  2026-11-19 16:51   ` kernel test robot
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Mostafa Saleh @ 2026-11-19 14:56 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Uwe Kleine-König, Greg Kroah-Hartman, Jonathan Corbet,
	Shuah Khan, Randy Dunlap, Rafael J . Wysocki, Danilo Krummrich,
	Johan Hovold, Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	David Lechner, Armin Wolf, Thierry Reding, Mike Rapoport,
	Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang, linux-doc,
	linux-kernel, driver-core, linux-trace-kernel, Mark Brown,
	Bjorn Helgaas, Yishai Hadas, Longfang Liu, Ankit Agrawal,
	Brett Creeley, Giovanni Cabiddu, Michał Winiarski,
	Julian Ruess, Nipun Gupta, Nikhil Agarwal, Eric Auger,
	Pranjal Shrivastava, Ioana Ciornei, qat-linux, virtualization,
	intel-xe, kvm

On Wed, Nov 18, 2026 at 04:56:44PM -0700, Alex Williamson wrote:
> 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@nvidia.com>
> Cc: Longfang Liu <liulongfang@huawei.com>
> Cc: Ankit Agrawal <ankita@nvidia.com>
> Cc: Brett Creeley <brett.creeley@amd.com>
> Cc: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Julian Ruess <julianr@linux.ibm.com>
> Cc: Nipun Gupta <nipun.gupta@amd.com>
> Cc: Nikhil Agarwal <nikhil.agarwal@amd.com>
> Cc: Eric Auger <eric.auger@redhat.com>
> Cc: Mostafa Saleh <smostafa@google.com>
> Cc: Pranjal Shrivastava <praan@google.com>
> Cc: Ioana Ciornei <ioana.ciornei@nxp.com>
> Cc: qat-linux@intel.com
> Cc: virtualization@lists.linux.dev
> Cc: intel-xe@lists.freedesktop.org
> Cc: kvm@vger.kernel.org
> Signed-off-by: Alex Williamson <alex@shazbot.org>

Reviewed-by: Mostafa Saleh <smostafa@google.com>

Thanks,
Mostafa

> ---
> 
> 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/cdx/main.c b/drivers/vfio/cdx/main.c
> index 28dc8c825600..fb7679bf92fd 100644
> --- a/drivers/vfio/cdx/main.c
> +++ b/drivers/vfio/cdx/main.c
> @@ -358,6 +358,7 @@ static struct cdx_driver vfio_cdx_driver = {
>  	.match_id_table	= vfio_cdx_table,
>  	.driver	= {
>  		.name	= "vfio-cdx",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> index 15b05b8c0c90..1603f81e0257 100644
> --- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> @@ -597,6 +597,7 @@ static struct fsl_mc_driver vfio_fsl_mc_driver = {
>  	.remove		= vfio_fsl_mc_remove,
>  	.driver	= {
>  		.name	= "vfio-fsl-mc",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> index c82c59246a3f..5c56aff8db01 100644
> --- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> +++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> @@ -1737,7 +1737,8 @@ static struct pci_driver hisi_acc_vfio_pci_driver = {
>  	.id_table = hisi_acc_vfio_pci_table,
>  	.probe = hisi_acc_vfio_pci_probe,
>  	.remove = hisi_acc_vfio_pci_remove,
> -	.driver = { .pm = pm_ptr(&hisi_acc_vf_pm_ops) },
> +	.driver = { .pm = pm_ptr(&hisi_acc_vf_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &hisi_acc_vf_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/ism/main.c b/drivers/vfio/pci/ism/main.c
> index cce3bdf1f070..263b377e87c4 100644
> --- a/drivers/vfio/pci/ism/main.c
> +++ b/drivers/vfio/pci/ism/main.c
> @@ -399,7 +399,8 @@ static struct pci_driver ism_vfio_pci_driver = {
>  	.id_table = ism_device_table,
>  	.probe = ism_vfio_pci_probe,
>  	.remove = ism_vfio_pci_remove,
> -	.driver	= { .pm = pm_ptr(&ism_vfio_pm_ops) },
> +	.driver	= { .pm = pm_ptr(&ism_vfio_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &ism_vfio_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/mlx5/main.c b/drivers/vfio/pci/mlx5/main.c
> index 18a6d224b1fd..63c89e461be8 100644
> --- a/drivers/vfio/pci/mlx5/main.c
> +++ b/drivers/vfio/pci/mlx5/main.c
> @@ -1451,7 +1451,8 @@ static struct pci_driver mlx5vf_pci_driver = {
>  	.id_table = mlx5vf_pci_table,
>  	.probe = mlx5vf_pci_probe,
>  	.remove = mlx5vf_pci_remove,
> -	.driver	= { .pm = pm_ptr(&mlx5vf_pm_ops) },
> +	.driver	= { .pm = pm_ptr(&mlx5vf_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &mlx5vf_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/nvgrace-gpu/main.c b/drivers/vfio/pci/nvgrace-gpu/main.c
> index 5ddec340b73b..946da32c61ff 100644
> --- a/drivers/vfio/pci/nvgrace-gpu/main.c
> +++ b/drivers/vfio/pci/nvgrace-gpu/main.c
> @@ -1438,7 +1438,8 @@ static struct pci_driver nvgrace_gpu_vfio_pci_driver = {
>  	.id_table = nvgrace_gpu_vfio_pci_table,
>  	.probe = nvgrace_gpu_probe,
>  	.remove = nvgrace_gpu_remove,
> -	.driver = { .pm = pm_ptr(&nvgrace_gpu_pm_ops) },
> +	.driver = { .pm = pm_ptr(&nvgrace_gpu_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &nvgrace_gpu_vfio_pci_err_handlers,
>  	.driver_managed_dma = true,
>  };
> 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,
>  };
> diff --git a/drivers/vfio/pci/qat/main.c b/drivers/vfio/pci/qat/main.c
> index 69448fa57df4..8a616f9b6494 100644
> --- a/drivers/vfio/pci/qat/main.c
> +++ b/drivers/vfio/pci/qat/main.c
> @@ -695,7 +695,8 @@ static struct pci_driver qat_vf_vfio_pci_driver = {
>  	.id_table = qat_vf_vfio_pci_table,
>  	.probe = qat_vf_vfio_pci_probe,
>  	.remove = qat_vf_vfio_pci_remove,
> -	.driver	= { .pm = pm_ptr(&qat_vf_pm_ops) },
> +	.driver	= { .pm = pm_ptr(&qat_vf_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &qat_vf_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
> index e7c012febe91..fde2c3fc88eb 100644
> --- a/drivers/vfio/pci/vfio_pci.c
> +++ b/drivers/vfio/pci/vfio_pci.c
> @@ -260,7 +260,8 @@ static struct pci_driver vfio_pci_driver = {
>  	.remove			= vfio_pci_remove,
>  	.sriov_configure	= vfio_pci_sriov_configure,
>  	.err_handler		= &vfio_pci_err_handlers,
> -	.driver		= { .pm = pm_ptr(&vfio_pci_pm_ops) },
> +	.driver		= { .pm = pm_ptr(&vfio_pci_pm_ops),
> +			    .support_driver_override = true },
>  	.driver_managed_dma	= true,
>  };
>  
> diff --git a/drivers/vfio/pci/virtio/main.c b/drivers/vfio/pci/virtio/main.c
> index 123ff5193812..1e02a8fd4a61 100644
> --- a/drivers/vfio/pci/virtio/main.c
> +++ b/drivers/vfio/pci/virtio/main.c
> @@ -222,7 +222,8 @@ static struct pci_driver virtiovf_pci_driver = {
>  	.id_table = virtiovf_pci_table,
>  	.probe = virtiovf_pci_probe,
>  	.remove = virtiovf_pci_remove,
> -	.driver = { .pm = pm_ptr(&virtiovf_pm_ops) },
> +	.driver = { .pm = pm_ptr(&virtiovf_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &virtiovf_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/xe/main.c b/drivers/vfio/pci/xe/main.c
> index 7dab3e024aa8..e0ab61f604de 100644
> --- a/drivers/vfio/pci/xe/main.c
> +++ b/drivers/vfio/pci/xe/main.c
> @@ -592,7 +592,8 @@ static struct pci_driver xe_vfio_pci_driver = {
>  	.id_table = xe_vfio_pci_table,
>  	.probe = xe_vfio_pci_probe,
>  	.remove = xe_vfio_pci_remove,
> -	.driver = { .pm = pm_ptr(&xe_vfio_pm_ops) },
> +	.driver = { .pm = pm_ptr(&xe_vfio_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &xe_vfio_pci_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/platform/vfio_amba.c b/drivers/vfio/platform/vfio_amba.c
> index fa754f203b2d..2c87caf1b7f7 100644
> --- a/drivers/vfio/platform/vfio_amba.c
> +++ b/drivers/vfio/platform/vfio_amba.c
> @@ -137,6 +137,7 @@ static struct amba_driver vfio_amba_driver = {
>  	.id_table = vfio_amba_ids,
>  	.drv = {
>  		.name = "vfio-amba",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/platform/vfio_platform.c b/drivers/vfio/platform/vfio_platform.c
> index a4d3ace3e02d..93d06032cdde 100644
> --- a/drivers/vfio/platform/vfio_platform.c
> +++ b/drivers/vfio/platform/vfio_platform.c
> @@ -116,6 +116,7 @@ static struct platform_driver vfio_platform_driver = {
>  	.remove		= vfio_platform_remove,
>  	.driver	= {
>  		.name	= "vfio-platform",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };
> -- 
> 2.54.0
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 23:56 ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
                     ` (2 preceding siblings ...)
  2026-11-19 14:56   ` Mostafa Saleh
@ 2026-11-19 16:51   ` kernel test robot
  2026-11-19 16:51   ` kernel test robot
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2026-11-19 16:51 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: llvm, oe-kbuild-all, Alex Williamson, Greg Kroah-Hartman,
	Jonathan Corbet, Shuah Khan, Randy Dunlap, Rafael J . Wysocki,
	Danilo Krummrich, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Armin Wolf, Thierry Reding,
	Mike Rapoport, Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton,
	Linux Memory Management List, Petr Mladek, Pnina Feder,
	Mete Durlu

Hi Alex,

kernel test robot noticed the following build errors:

[auto build test ERROR on awilliam-vfio/next]
[also build test ERROR on linus/master v7.4-rc3 next-20261116]
[cannot apply to awilliam-vfio/for-linus]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Williamson/vfio-Allow-untainted-use-of-driver_override/20261118-165644
base:   https://github.com/awilliam/linux-vfio.git next
patch link:    https://lore.kernel.org/r/20261118235645.2907908-2-alex%40shazbot.org
patch subject: [PATCH] vfio: Allow untainted use of driver_override
config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20261120/202611200005.ynk0zwGb-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 3b14d7c370558b46e5f0c6494a05c492e59bf32c)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611200005.ynk0zwGb-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611200005.ynk0zwGb-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/vfio/pci/vfio_pci.c:264:9: error: field designator 'support_driver_override' does not refer to any field in type 'struct device_driver'
     264 |                             .support_driver_override = true },
         |                             ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +264 drivers/vfio/pci/vfio_pci.c

   255	
   256	static struct pci_driver vfio_pci_driver = {
   257		.name			= "vfio-pci",
   258		.id_table		= vfio_pci_table,
   259		.probe			= vfio_pci_probe,
   260		.remove			= vfio_pci_remove,
   261		.sriov_configure	= vfio_pci_sriov_configure,
   262		.err_handler		= &vfio_pci_err_handlers,
   263		.driver		= { .pm = pm_ptr(&vfio_pci_pm_ops),
 > 264				    .support_driver_override = true },
   265		.driver_managed_dma	= true,
   266	};
   267	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 23:56 ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
                     ` (3 preceding siblings ...)
  2026-11-19 16:51   ` kernel test robot
@ 2026-11-19 16:51   ` kernel test robot
  2026-11-19 17:40   ` kernel test robot
                     ` (2 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2026-11-19 16:51 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: oe-kbuild-all, Alex Williamson, Greg Kroah-Hartman,
	Jonathan Corbet, Shuah Khan, Randy Dunlap, Rafael J . Wysocki,
	Danilo Krummrich, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Armin Wolf, Thierry Reding,
	Mike Rapoport, Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton,
	Linux Memory Management List, Petr Mladek, Pnina Feder,
	Mete Durlu

Hi Alex,

kernel test robot noticed the following build errors:

[auto build test ERROR on awilliam-vfio/next]
[also build test ERROR on linus/master v7.4-rc3 next-20261116]
[cannot apply to awilliam-vfio/for-linus]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Williamson/vfio-Allow-untainted-use-of-driver_override/20261118-165644
base:   https://github.com/awilliam/linux-vfio.git next
patch link:    https://lore.kernel.org/r/20261118235645.2907908-2-alex%40shazbot.org
patch subject: [PATCH] vfio: Allow untainted use of driver_override
config: arm-randconfig-1000-20261119 (https://download.01.org/0day-ci/archive/20261120/202611200009.RQOE0yny-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 15.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611200009.RQOE0yny-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611200009.RQOE0yny-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/vfio/platform/vfio_platform.c:119:18: error: 'struct device_driver' has no member named 'support_driver_override'
     119 |                 .support_driver_override = true,
         |                  ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/vfio/platform/vfio_platform.c:119:44: error: initialization of 'const struct bus_type *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     119 |                 .support_driver_override = true,
         |                                            ^~~~
   drivers/vfio/platform/vfio_platform.c:119:44: note: (near initialization for 'vfio_platform_driver.driver.bus')


vim +119 drivers/vfio/platform/vfio_platform.c

   113	
   114	static struct platform_driver vfio_platform_driver = {
   115		.probe		= vfio_platform_probe,
   116		.remove		= vfio_platform_remove,
   117		.driver	= {
   118			.name	= "vfio-platform",
 > 119			.support_driver_override = true,
   120		},
   121		.driver_managed_dma = true,
   122	};
   123	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
@ 2026-11-19 16:53 kernel test robot
  0 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2026-11-19 16:53 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "too many reports for this commit"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20261118235645.2907908-2-alex@shazbot.org>
References: <20261118235645.2907908-2-alex@shazbot.org>
TO: Alex Williamson <alex@shazbot.org>
TO: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
CC: Alex Williamson <alex@shazbot.org>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: Jonathan Corbet <corbet@lwn.net>
CC: Shuah Khan <skhan@linuxfoundation.org>
CC: Randy Dunlap <rdunlap@infradead.org>
CC: "Rafael J . Wysocki" <rafael@kernel.org>
CC: Danilo Krummrich <dakr@kernel.org>
CC: Johan Hovold <johan@kernel.org>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Masami Hiramatsu <mhiramat@kernel.org>
CC: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: David Lechner <dlechner@baylibre.com>
CC: Armin Wolf <W_Armin@gmx.de>
CC: Thierry Reding <thierry.reding@kernel.org>
CC: Mike Rapoport <rppt@kernel.org>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Karl Mehltretter <kmehltretter@gmail.com>
CC: "Paul E . McKenney" <paulmck@kernel.org>
CC: Borislav Petkov <bp@alien8.de>
CC: Dapeng Mi <dapeng1.mi@linux.intel.com>
CC: Marco Elver <elver@google.com>
CC: "Ethan Nelson-Moore" <enelsonmoore@gmail.com>
CC: Jeff Layton <jlayton@kernel.org>
CC: Bradley Morgan <brads@mainlining.org>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: Petr Mladek <pmladek@suse.com>
CC: Pnina Feder <pnina.feder@mobileye.com>
CC: Mete Durlu <meted@linux.ibm.com>

Hi Alex,

kernel test robot noticed the following build errors:

[auto build test ERROR on awilliam-vfio/next]
[also build test ERROR on linus/master v7.4-rc3 next-20261116]
[cannot apply to awilliam-vfio/for-linus]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Williamson/vfio-Allow-untainted-use-of-driver_override/20261118-165644
base:   https://github.com/awilliam/linux-vfio.git next
patch link:    https://lore.kernel.org/r/20261118235645.2907908-2-alex%40shazbot.org
patch subject: [PATCH] vfio: Allow untainted use of driver_override
:::::: branch date: 7 hours ago
:::::: commit date: 7 hours ago
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20261120/202611200026.gDtr55Vd-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611200026.gDtr55Vd-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202611200026.gDtr55Vd-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/vfio/pci/vfio_pci.c:264:30: error: 'struct device_driver' has no member named 'support_driver_override'
     264 |                             .support_driver_override = true },
         |                              ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/vfio/pci/vfio_pci.c:264:56: error: initialization of 'void (*)(struct device *)' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     264 |                             .support_driver_override = true },
         |                                                        ^~~~
   drivers/vfio/pci/vfio_pci.c:264:56: note: (near initialization for 'vfio_pci_driver.driver.coredump')
--
>> drivers/vfio/pci/mlx5/main.c:1455:22: error: 'struct device_driver' has no member named 'support_driver_override'
    1455 |                     .support_driver_override = true },
         |                      ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/vfio/pci/mlx5/main.c:1455:48: error: initialization of 'void (*)(struct device *)' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1455 |                     .support_driver_override = true },
         |                                                ^~~~
   drivers/vfio/pci/mlx5/main.c:1455:48: note: (near initialization for 'mlx5vf_pci_driver.driver.coredump')


vim +264 drivers/vfio/pci/vfio_pci.c

6a5f427bee12c82 Simon Song      2026-10-05  255  
ff53edf6d6ab097 Max Gurtovoy    2021-08-26  256  static struct pci_driver vfio_pci_driver = {
ff53edf6d6ab097 Max Gurtovoy    2021-08-26  257  	.name			= "vfio-pci",
cc6711b0bf36de0 Max Gurtovoy    2021-08-26  258  	.id_table		= vfio_pci_table,
ff53edf6d6ab097 Max Gurtovoy    2021-08-26  259  	.probe			= vfio_pci_probe,
ff53edf6d6ab097 Max Gurtovoy    2021-08-26  260  	.remove			= vfio_pci_remove,
ff53edf6d6ab097 Max Gurtovoy    2021-08-26  261  	.sriov_configure	= vfio_pci_sriov_configure,
6a5f427bee12c82 Simon Song      2026-10-05  262  	.err_handler		= &vfio_pci_err_handlers,
722a3b248ee2110 Alex Williamson 2026-11-18  263  	.driver		= { .pm = pm_ptr(&vfio_pci_pm_ops),
722a3b248ee2110 Alex Williamson 2026-11-18 @264  			    .support_driver_override = true },
70693f470848f05 Lu Baolu        2022-04-18  265  	.driver_managed_dma	= true,
ff53edf6d6ab097 Max Gurtovoy    2021-08-26  266  };
ff53edf6d6ab097 Max Gurtovoy    2021-08-26  267  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 23:56 ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
                     ` (4 preceding siblings ...)
  2026-11-19 16:51   ` kernel test robot
@ 2026-11-19 17:40   ` kernel test robot
  2026-11-19 18:36   ` Ankit Agrawal
  2026-11-20  2:17   ` Yao Yuan
  7 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2026-11-19 17:40 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: oe-kbuild-all, Alex Williamson, Greg Kroah-Hartman,
	Jonathan Corbet, Shuah Khan, Randy Dunlap, Rafael J . Wysocki,
	Danilo Krummrich, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Armin Wolf, Thierry Reding,
	Mike Rapoport, Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton,
	Linux Memory Management List, Petr Mladek, Pnina Feder,
	Mete Durlu

Hi Alex,

kernel test robot noticed the following build warnings:

[auto build test WARNING on awilliam-vfio/next]
[also build test WARNING on linus/master v7.4-rc3 next-20261116]
[cannot apply to awilliam-vfio/for-linus]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Williamson/vfio-Allow-untainted-use-of-driver_override/20261118-165644
base:   https://github.com/awilliam/linux-vfio.git next
patch link:    https://lore.kernel.org/r/20261118235645.2907908-2-alex%40shazbot.org
patch subject: [PATCH] vfio: Allow untainted use of driver_override
config: sparc64-randconfig-1000-20261119 (https://download.01.org/0day-ci/archive/20261120/202611200125.3szMlcTc-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611200125.3szMlcTc-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611200125.3szMlcTc-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/vfio/pci/pds/pci_drv.c:188:22: error: 'struct device_driver' has no member named 'support_driver_override'
     188 |                     .support_driver_override = true },
         |                      ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/vfio/pci/pds/pci_drv.c:188:48: warning: initialization of 'void (*)(struct device *)' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     188 |                     .support_driver_override = true },
         |                                                ^~~~
   drivers/vfio/pci/pds/pci_drv.c:188:48: note: (near initialization for 'pds_vfio_pci_driver.driver.coredump')


vim +188 drivers/vfio/pci/pds/pci_drv.c

   181	
   182	static struct pci_driver pds_vfio_pci_driver = {
   183		.name = KBUILD_MODNAME,
   184		.id_table = pds_vfio_pci_table,
   185		.probe = pds_vfio_pci_probe,
   186		.remove = pds_vfio_pci_remove,
   187		.driver = { .pm = pm_ptr(&pds_vfio_pm_ops),
 > 188			    .support_driver_override = true },
   189		.err_handler = &pds_vfio_pci_err_handlers,
   190		.driver_managed_dma = true,
   191	};
   192	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 23:56 ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
                     ` (5 preceding siblings ...)
  2026-11-19 17:40   ` kernel test robot
@ 2026-11-19 18:36   ` Ankit Agrawal
  2026-11-20  2:17   ` Yao Yuan
  7 siblings, 0 replies; 13+ messages in thread
From: Ankit Agrawal @ 2026-11-19 18:36 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: Greg Kroah-Hartman, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	Rafael J . Wysocki, Danilo Krummrich, Johan Hovold,
	Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	David Lechner, Armin Wolf, Thierry Reding, Mike Rapoport,
	Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	driver-core@lists.linux.dev, linux-trace-kernel@vger.kernel.org,
	Mark Brown, Bjorn Helgaas, Yishai Hadas, Longfang Liu,
	Brett Creeley, Giovanni Cabiddu, Michał Winiarski,
	Julian Ruess, Nipun Gupta, Nikhil Agarwal, Eric Auger,
	Mostafa Saleh, Pranjal Shrivastava, Ioana Ciornei,
	qat-linux@intel.com, virtualization@lists.linux.dev,
	intel-xe@lists.freedesktop.org, kvm@vger.kernel.org

Reviewed-by: Ankit Agrawal <ankita@nvidia.com>

Thanks!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
@ 2026-11-19 19:08 kernel test robot
  0 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2026-11-19 19:08 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "too many reports for this commit"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20261118235645.2907908-2-alex@shazbot.org>
References: <20261118235645.2907908-2-alex@shazbot.org>
TO: Alex Williamson <alex@shazbot.org>
TO: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
CC: Alex Williamson <alex@shazbot.org>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: Jonathan Corbet <corbet@lwn.net>
CC: Shuah Khan <skhan@linuxfoundation.org>
CC: Randy Dunlap <rdunlap@infradead.org>
CC: "Rafael J . Wysocki" <rafael@kernel.org>
CC: Danilo Krummrich <dakr@kernel.org>
CC: Johan Hovold <johan@kernel.org>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Masami Hiramatsu <mhiramat@kernel.org>
CC: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: David Lechner <dlechner@baylibre.com>
CC: Armin Wolf <W_Armin@gmx.de>
CC: Thierry Reding <thierry.reding@kernel.org>
CC: Mike Rapoport <rppt@kernel.org>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Karl Mehltretter <kmehltretter@gmail.com>
CC: "Paul E . McKenney" <paulmck@kernel.org>
CC: Borislav Petkov <bp@alien8.de>
CC: Dapeng Mi <dapeng1.mi@linux.intel.com>
CC: Marco Elver <elver@google.com>
CC: "Ethan Nelson-Moore" <enelsonmoore@gmail.com>
CC: Jeff Layton <jlayton@kernel.org>
CC: Bradley Morgan <brads@mainlining.org>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: Petr Mladek <pmladek@suse.com>
CC: Pnina Feder <pnina.feder@mobileye.com>
CC: Mete Durlu <meted@linux.ibm.com>

Hi Alex,

kernel test robot noticed the following build errors:

[auto build test ERROR on awilliam-vfio/next]
[also build test ERROR on linus/master v7.4-rc3 next-20261116]
[cannot apply to awilliam-vfio/for-linus]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Williamson/vfio-Allow-untainted-use-of-driver_override/20261118-165644
base:   https://github.com/awilliam/linux-vfio.git next
patch link:    https://lore.kernel.org/r/20261118235645.2907908-2-alex%40shazbot.org
patch subject: [PATCH] vfio: Allow untainted use of driver_override
:::::: branch date: 9 hours ago
:::::: commit date: 9 hours ago
config: s390-randconfig-1001-20261119 (https://download.01.org/0day-ci/archive/20261120/202611200233.KNmMbpyn-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 14.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611200233.KNmMbpyn-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202611200233.KNmMbpyn-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/vfio/platform/vfio_amba.c:140:18: error: 'struct device_driver' has no member named 'support_driver_override'
     140 |                 .support_driver_override = true,
         |                  ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/vfio/platform/vfio_amba.c:140:44: error: initialization of 'const struct bus_type *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     140 |                 .support_driver_override = true,
         |                                            ^~~~
   drivers/vfio/platform/vfio_amba.c:140:44: note: (near initialization for 'vfio_amba_driver.drv.bus')


vim +140 drivers/vfio/platform/vfio_amba.c

36fe431f2811fa3 Antonios Motakis   2015-03-16  133  
36fe431f2811fa3 Antonios Motakis   2015-03-16  134  static struct amba_driver vfio_amba_driver = {
36fe431f2811fa3 Antonios Motakis   2015-03-16  135  	.probe = vfio_amba_probe,
36fe431f2811fa3 Antonios Motakis   2015-03-16  136  	.remove = vfio_amba_remove,
ec29d22caea85d9 Geert Uytterhoeven 2024-02-26  137  	.id_table = vfio_amba_ids,
36fe431f2811fa3 Antonios Motakis   2015-03-16  138  	.drv = {
36fe431f2811fa3 Antonios Motakis   2015-03-16  139  		.name = "vfio-amba",
722a3b248ee2110 Alex Williamson    2026-11-18 @140  		.support_driver_override = true,
36fe431f2811fa3 Antonios Motakis   2015-03-16  141  	},
70693f470848f05 Lu Baolu           2022-04-18  142  	.driver_managed_dma = true,
36fe431f2811fa3 Antonios Motakis   2015-03-16  143  };
36fe431f2811fa3 Antonios Motakis   2015-03-16  144  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
@ 2026-11-19 20:00 kernel test robot
  0 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2026-11-19 20:00 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "too many reports for this commit"
:::::: 

BCC: lkp@intel.com
CC: llvm@lists.linux.dev
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20261118235645.2907908-2-alex@shazbot.org>
References: <20261118235645.2907908-2-alex@shazbot.org>
TO: Alex Williamson <alex@shazbot.org>
TO: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
CC: Alex Williamson <alex@shazbot.org>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: Jonathan Corbet <corbet@lwn.net>
CC: Shuah Khan <skhan@linuxfoundation.org>
CC: Randy Dunlap <rdunlap@infradead.org>
CC: "Rafael J . Wysocki" <rafael@kernel.org>
CC: Danilo Krummrich <dakr@kernel.org>
CC: Johan Hovold <johan@kernel.org>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Masami Hiramatsu <mhiramat@kernel.org>
CC: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: David Lechner <dlechner@baylibre.com>
CC: Armin Wolf <W_Armin@gmx.de>
CC: Thierry Reding <thierry.reding@kernel.org>
CC: Mike Rapoport <rppt@kernel.org>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Karl Mehltretter <kmehltretter@gmail.com>
CC: "Paul E . McKenney" <paulmck@kernel.org>
CC: Borislav Petkov <bp@alien8.de>
CC: Dapeng Mi <dapeng1.mi@linux.intel.com>
CC: Marco Elver <elver@google.com>
CC: "Ethan Nelson-Moore" <enelsonmoore@gmail.com>
CC: Jeff Layton <jlayton@kernel.org>
CC: Bradley Morgan <brads@mainlining.org>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: Petr Mladek <pmladek@suse.com>
CC: Pnina Feder <pnina.feder@mobileye.com>
CC: Mete Durlu <meted@linux.ibm.com>

Hi Alex,

kernel test robot noticed the following build errors:

[auto build test ERROR on awilliam-vfio/next]
[also build test ERROR on linus/master v7.4-rc3 next-20261116]
[cannot apply to awilliam-vfio/for-linus]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Williamson/vfio-Allow-untainted-use-of-driver_override/20261118-165644
base:   https://github.com/awilliam/linux-vfio.git next
patch link:    https://lore.kernel.org/r/20261118235645.2907908-2-alex%40shazbot.org
patch subject: [PATCH] vfio: Allow untainted use of driver_override
:::::: branch date: 10 hours ago
:::::: commit date: 10 hours ago
config: s390-defconfig (https://download.01.org/0day-ci/archive/20261120/202611200348.62aJTdIu-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611200348.62aJTdIu-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202611200348.62aJTdIu-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/vfio/pci/mlx5/main.c:1455:8: error: field designator 'support_driver_override' does not refer to any field in type 'struct device_driver'
    1455 |                     .support_driver_override = true },
         |                     ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +1455 drivers/vfio/pci/mlx5/main.c

88faa5e8ead62a Yishai Hadas    2022-02-24  1448  
6fadb021266d03 Yishai Hadas    2022-02-24  1449  static struct pci_driver mlx5vf_pci_driver = {
6fadb021266d03 Yishai Hadas    2022-02-24  1450  	.name = KBUILD_MODNAME,
6fadb021266d03 Yishai Hadas    2022-02-24  1451  	.id_table = mlx5vf_pci_table,
6fadb021266d03 Yishai Hadas    2022-02-24  1452  	.probe = mlx5vf_pci_probe,
6fadb021266d03 Yishai Hadas    2022-02-24  1453  	.remove = mlx5vf_pci_remove,
722a3b248ee211 Alex Williamson 2026-11-18  1454  	.driver	= { .pm = pm_ptr(&mlx5vf_pm_ops),
722a3b248ee211 Alex Williamson 2026-11-18 @1455  		    .support_driver_override = true },
88faa5e8ead62a Yishai Hadas    2022-02-24  1456  	.err_handler = &mlx5vf_err_handlers,
c490513c818d1e Jason Gunthorpe 2022-05-19  1457  	.driver_managed_dma = true,
6fadb021266d03 Yishai Hadas    2022-02-24  1458  };
6fadb021266d03 Yishai Hadas    2022-02-24  1459  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 23:56 ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
                     ` (6 preceding siblings ...)
  2026-11-19 18:36   ` Ankit Agrawal
@ 2026-11-20  2:17   ` Yao Yuan
  2026-11-20 14:10     ` Uwe Kleine-König
  7 siblings, 1 reply; 13+ messages in thread
From: Yao Yuan @ 2026-11-20  2:17 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Uwe Kleine-König, Greg Kroah-Hartman, Jonathan Corbet,
	Shuah Khan, Randy Dunlap, Rafael J . Wysocki, Danilo Krummrich,
	Johan Hovold, Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	David Lechner, Armin Wolf, Thierry Reding, Mike Rapoport,
	Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang, linux-doc,
	linux-kernel, driver-core, linux-trace-kernel, Mark Brown,
	Bjorn Helgaas, Yishai Hadas, Longfang Liu, Ankit Agrawal,
	Brett Creeley, Giovanni Cabiddu, Michał Winiarski,
	Julian Ruess, Nipun Gupta, Nikhil Agarwal, Eric Auger,
	Mostafa Saleh, Pranjal Shrivastava, Ioana Ciornei, qat-linux,
	virtualization, intel-xe, kvm

On Wed, Nov 18, 2026 at 04:56:44PM +0800, Alex Williamson wrote:
> 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.
>

Hi Alex,

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

LGTM.

Reviewed-by: Yuan Yao <yaoyuan@linux.alibaba.com>

>
> Cc: Yishai Hadas <yishaih@nvidia.com>
> Cc: Longfang Liu <liulongfang@huawei.com>
> Cc: Ankit Agrawal <ankita@nvidia.com>
> Cc: Brett Creeley <brett.creeley@amd.com>
> Cc: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Julian Ruess <julianr@linux.ibm.com>
> Cc: Nipun Gupta <nipun.gupta@amd.com>
> Cc: Nikhil Agarwal <nikhil.agarwal@amd.com>
> Cc: Eric Auger <eric.auger@redhat.com>
> Cc: Mostafa Saleh <smostafa@google.com>
> Cc: Pranjal Shrivastava <praan@google.com>
> Cc: Ioana Ciornei <ioana.ciornei@nxp.com>
> Cc: qat-linux@intel.com
> Cc: virtualization@lists.linux.dev
> Cc: intel-xe@lists.freedesktop.org
> Cc: kvm@vger.kernel.org
> Signed-off-by: Alex Williamson <alex@shazbot.org>
> ---
>
> 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/cdx/main.c b/drivers/vfio/cdx/main.c
> index 28dc8c825600..fb7679bf92fd 100644
> --- a/drivers/vfio/cdx/main.c
> +++ b/drivers/vfio/cdx/main.c
> @@ -358,6 +358,7 @@ static struct cdx_driver vfio_cdx_driver = {
>  	.match_id_table	= vfio_cdx_table,
>  	.driver	= {
>  		.name	= "vfio-cdx",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> index 15b05b8c0c90..1603f81e0257 100644
> --- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> @@ -597,6 +597,7 @@ static struct fsl_mc_driver vfio_fsl_mc_driver = {
>  	.remove		= vfio_fsl_mc_remove,
>  	.driver	= {
>  		.name	= "vfio-fsl-mc",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> index c82c59246a3f..5c56aff8db01 100644
> --- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> +++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> @@ -1737,7 +1737,8 @@ static struct pci_driver hisi_acc_vfio_pci_driver = {
>  	.id_table = hisi_acc_vfio_pci_table,
>  	.probe = hisi_acc_vfio_pci_probe,
>  	.remove = hisi_acc_vfio_pci_remove,
> -	.driver = { .pm = pm_ptr(&hisi_acc_vf_pm_ops) },
> +	.driver = { .pm = pm_ptr(&hisi_acc_vf_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &hisi_acc_vf_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/ism/main.c b/drivers/vfio/pci/ism/main.c
> index cce3bdf1f070..263b377e87c4 100644
> --- a/drivers/vfio/pci/ism/main.c
> +++ b/drivers/vfio/pci/ism/main.c
> @@ -399,7 +399,8 @@ static struct pci_driver ism_vfio_pci_driver = {
>  	.id_table = ism_device_table,
>  	.probe = ism_vfio_pci_probe,
>  	.remove = ism_vfio_pci_remove,
> -	.driver	= { .pm = pm_ptr(&ism_vfio_pm_ops) },
> +	.driver	= { .pm = pm_ptr(&ism_vfio_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &ism_vfio_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/mlx5/main.c b/drivers/vfio/pci/mlx5/main.c
> index 18a6d224b1fd..63c89e461be8 100644
> --- a/drivers/vfio/pci/mlx5/main.c
> +++ b/drivers/vfio/pci/mlx5/main.c
> @@ -1451,7 +1451,8 @@ static struct pci_driver mlx5vf_pci_driver = {
>  	.id_table = mlx5vf_pci_table,
>  	.probe = mlx5vf_pci_probe,
>  	.remove = mlx5vf_pci_remove,
> -	.driver	= { .pm = pm_ptr(&mlx5vf_pm_ops) },
> +	.driver	= { .pm = pm_ptr(&mlx5vf_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &mlx5vf_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/nvgrace-gpu/main.c b/drivers/vfio/pci/nvgrace-gpu/main.c
> index 5ddec340b73b..946da32c61ff 100644
> --- a/drivers/vfio/pci/nvgrace-gpu/main.c
> +++ b/drivers/vfio/pci/nvgrace-gpu/main.c
> @@ -1438,7 +1438,8 @@ static struct pci_driver nvgrace_gpu_vfio_pci_driver = {
>  	.id_table = nvgrace_gpu_vfio_pci_table,
>  	.probe = nvgrace_gpu_probe,
>  	.remove = nvgrace_gpu_remove,
> -	.driver = { .pm = pm_ptr(&nvgrace_gpu_pm_ops) },
> +	.driver = { .pm = pm_ptr(&nvgrace_gpu_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &nvgrace_gpu_vfio_pci_err_handlers,
>  	.driver_managed_dma = true,
>  };
> 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,
>  };
> diff --git a/drivers/vfio/pci/qat/main.c b/drivers/vfio/pci/qat/main.c
> index 69448fa57df4..8a616f9b6494 100644
> --- a/drivers/vfio/pci/qat/main.c
> +++ b/drivers/vfio/pci/qat/main.c
> @@ -695,7 +695,8 @@ static struct pci_driver qat_vf_vfio_pci_driver = {
>  	.id_table = qat_vf_vfio_pci_table,
>  	.probe = qat_vf_vfio_pci_probe,
>  	.remove = qat_vf_vfio_pci_remove,
> -	.driver	= { .pm = pm_ptr(&qat_vf_pm_ops) },
> +	.driver	= { .pm = pm_ptr(&qat_vf_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &qat_vf_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
> index e7c012febe91..fde2c3fc88eb 100644
> --- a/drivers/vfio/pci/vfio_pci.c
> +++ b/drivers/vfio/pci/vfio_pci.c
> @@ -260,7 +260,8 @@ static struct pci_driver vfio_pci_driver = {
>  	.remove			= vfio_pci_remove,
>  	.sriov_configure	= vfio_pci_sriov_configure,
>  	.err_handler		= &vfio_pci_err_handlers,
> -	.driver		= { .pm = pm_ptr(&vfio_pci_pm_ops) },
> +	.driver		= { .pm = pm_ptr(&vfio_pci_pm_ops),
> +			    .support_driver_override = true },
>  	.driver_managed_dma	= true,
>  };
>
> diff --git a/drivers/vfio/pci/virtio/main.c b/drivers/vfio/pci/virtio/main.c
> index 123ff5193812..1e02a8fd4a61 100644
> --- a/drivers/vfio/pci/virtio/main.c
> +++ b/drivers/vfio/pci/virtio/main.c
> @@ -222,7 +222,8 @@ static struct pci_driver virtiovf_pci_driver = {
>  	.id_table = virtiovf_pci_table,
>  	.probe = virtiovf_pci_probe,
>  	.remove = virtiovf_pci_remove,
> -	.driver = { .pm = pm_ptr(&virtiovf_pm_ops) },
> +	.driver = { .pm = pm_ptr(&virtiovf_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &virtiovf_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/xe/main.c b/drivers/vfio/pci/xe/main.c
> index 7dab3e024aa8..e0ab61f604de 100644
> --- a/drivers/vfio/pci/xe/main.c
> +++ b/drivers/vfio/pci/xe/main.c
> @@ -592,7 +592,8 @@ static struct pci_driver xe_vfio_pci_driver = {
>  	.id_table = xe_vfio_pci_table,
>  	.probe = xe_vfio_pci_probe,
>  	.remove = xe_vfio_pci_remove,
> -	.driver = { .pm = pm_ptr(&xe_vfio_pm_ops) },
> +	.driver = { .pm = pm_ptr(&xe_vfio_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &xe_vfio_pci_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/platform/vfio_amba.c b/drivers/vfio/platform/vfio_amba.c
> index fa754f203b2d..2c87caf1b7f7 100644
> --- a/drivers/vfio/platform/vfio_amba.c
> +++ b/drivers/vfio/platform/vfio_amba.c
> @@ -137,6 +137,7 @@ static struct amba_driver vfio_amba_driver = {
>  	.id_table = vfio_amba_ids,
>  	.drv = {
>  		.name = "vfio-amba",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/platform/vfio_platform.c b/drivers/vfio/platform/vfio_platform.c
> index a4d3ace3e02d..93d06032cdde 100644
> --- a/drivers/vfio/platform/vfio_platform.c
> +++ b/drivers/vfio/platform/vfio_platform.c
> @@ -116,6 +116,7 @@ static struct platform_driver vfio_platform_driver = {
>  	.remove		= vfio_platform_remove,
>  	.driver	= {
>  		.name	= "vfio-platform",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };
> --
> 2.54.0
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-20  2:17   ` Yao Yuan
@ 2026-11-20 14:10     ` Uwe Kleine-König
  0 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2026-11-20 14:10 UTC (permalink / raw)
  To: Yao Yuan
  Cc: Alex Williamson, Greg Kroah-Hartman, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Rafael J . Wysocki, Danilo Krummrich, Johan Hovold,
	Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	David Lechner, Armin Wolf, Thierry Reding, Mike Rapoport,
	Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang, linux-doc,
	linux-kernel, driver-core, linux-trace-kernel, Mark Brown,
	Bjorn Helgaas, Yishai Hadas, Longfang Liu, Ankit Agrawal,
	Brett Creeley, Giovanni Cabiddu, Michał Winiarski,
	Julian Ruess, Nipun Gupta, Nikhil Agarwal, Eric Auger,
	Mostafa Saleh, Pranjal Shrivastava, Ioana Ciornei, qat-linux,
	virtualization, intel-xe, kvm

[-- Attachment #1: Type: text/plain, Size: 1136 bytes --]

On Fri, Nov 20, 2026 at 10:17:46AM +0800, Yao Yuan wrote:
> On Wed, Nov 18, 2026 at 04:56:44PM +0800, Alex Williamson wrote:
> > 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.
> >
> 
> Hi Alex,
> 
> > Set the support_driver_override flag on the driver struct across all
> > vfio drivers.
> 
> LGTM.
> 
> Reviewed-by: Yuan Yao <yaoyuan@linux.alibaba.com>

I missed your reply when I sent the next revision of this patch. I had
to trim the recipients of the v2 because gmail refused to send it with
everyone on Cc: who was emitted by get_maintainer.pl. So please see
https://lore.kernel.org/kvm/fb0df5c89336b77a373ae0f890f63427e4adbb28.1795171088.git.u.kleine-koenig@baylibre.com

But also note, that if v2 is picked up using `b4 am`, your Reviewed-by:
is considered as the patch didn't change.

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-11-20 14:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 20:00 [PATCH] vfio: Allow untainted use of driver_override kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2026-11-19 19:08 kernel test robot
2026-11-19 16:53 kernel test robot
2026-11-18 16:22 [PATCH] driver core: Disable driver overriding by default Danilo Krummrich
2026-11-18 23:56 ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
2026-11-19  0:09   ` sashiko-bot
2026-11-19  0:12   ` Creeley, Brett
2026-11-19 14:56   ` Mostafa Saleh
2026-11-19 16:51   ` kernel test robot
2026-11-19 16:51   ` kernel test robot
2026-11-19 17:40   ` kernel test robot
2026-11-19 18:36   ` Ankit Agrawal
2026-11-20  2:17   ` Yao Yuan
2026-11-20 14:10     ` Uwe Kleine-König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.