On 08/12/2025 17:54, Stefan Hajnoczi wrote:
On Mon, Dec 08, 2025 at 04:39:25PM +0200, Max Gurtovoy wrote:
Add support for the 'driver_override' attribute to Virtio devices. This
allows users to control which Virtio bus driver binds to a given Virtio
device.
If 'driver_override' is not set, the existing behavior is preserved and
devices will continue to auto-bind to the first matching Virtio bus
driver.
Signed-off-by: Avraham Evdaev <[email protected]>
Signed-off-by: Max Gurtovoy <[email protected]>
---
drivers/virtio/virtio.c | 34 ++++++++++++++++++++++++++++++++++
include/linux/virtio.h | 4 ++++
2 files changed, 38 insertions(+)
What is the use case? Is there something missing in existing drivers
that cannot be added to them by extending the code?
Stefan
The main goal is to align the virtio bus with the flexibility that already
exists for other buses in the Linux device model.
On buses such as PCI and vDPA, it is possible to override or replace the
default driver for a given device and bind it to an alternative driver.
Allowing the selection of which driver is bound to a device can be useful in
both development and production environments.