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

From: Anthony Krowiak

Date: Thu Nov 19 2026 - 07:15:37 EST




On 11/19/26 12:15 AM, Alex Williamson wrote:
The vfio_ap and vfio_ccw drivers bind devices through driver_override.
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 vfio_ap and vfio_ccw driver
structs.

Cc: Tony Krowiak <akrowiak@xxxxxxxxxxxxx>
Cc: Jason Herne <jjherne@xxxxxxxxxxxxx>
Cc: Eric Farman <farman@xxxxxxxxxxxxx>
Cc: Matthew Rosato <mjrosato@xxxxxxxxxxxxx>
Cc: Halil Pasic <pasic@xxxxxxxxxxxxx>
Cc: linux-s390@xxxxxxxxxxxxxxx
Signed-off-by: Alex Williamson <alex@xxxxxxxxxxx>
---

Uwe, this should complete the vfio drivers needing driver override,
covering the s390 specific drivers. Thanks,

Alex

drivers/s390/cio/vfio_ccw_drv.c | 1 +
drivers/s390/crypto/vfio_ap_drv.c | 1 +
2 files changed, 2 insertions(+)

diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c
index 7546bd137e4e..77765cde87f7 100644
--- a/drivers/s390/cio/vfio_ccw_drv.c
+++ b/drivers/s390/cio/vfio_ccw_drv.c
@@ -375,6 +375,7 @@ static struct css_driver vfio_ccw_sch_driver = {
.drv = {
.name = "vfio_ccw",
.owner = THIS_MODULE,
+ .support_driver_override = true,
},
.subchannel_type = vfio_ccw_sch_ids,
.irq = vfio_ccw_sch_irq,
diff --git a/drivers/s390/crypto/vfio_ap_drv.c b/drivers/s390/crypto/vfio_ap_drv.c
index 8e69ed286bb9..2d47dc643269 100644
--- a/drivers/s390/crypto/vfio_ap_drv.c
+++ b/drivers/s390/crypto/vfio_ap_drv.c
@@ -62,6 +62,7 @@ static struct ap_driver vfio_ap_drv = {
.on_config_changed = vfio_ap_on_cfg_changed,
.on_scan_complete = vfio_ap_on_scan_complete,
.ids = ap_queue_ids,
+ .driver.support_driver_override = true,

Does this really belong here? Shouldn't it be in struct ap_driver
since driver_override is supported in the AP bus?

};
static void vfio_ap_matrix_dev_release(struct device *dev)