From: Max Gurtovoy <mgurtovoy@nvidia.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: mst@redhat.com, sgarzare@redhat.com,
virtualization@lists.linux-foundation.org, oren@nvidia.com,
aevdaev@nvidia.com, aaptel@nvidia.com
Subject: Re: [PATCH 1/1] virtio: add driver_override support
Date: Tue, 9 Dec 2025 17:12:56 +0200 [thread overview]
Message-ID: <59d5c4c0-1679-435b-9c19-7778845331bf@nvidia.com> (raw)
In-Reply-To: <20251209135902.GA1370792@fedora>
On 09/12/2025 15:59, Stefan Hajnoczi wrote:
> On Mon, Dec 08, 2025 at 06:18:14PM +0200, Max Gurtovoy wrote:
>> 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 <aevdaev@nvidia.com>
>>>> Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
>>>> ---
>>>> 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.
> There are use cases for PCI and vDPA, like binding vfio_pci to a device
> that would normally use its device-specific driver.
>
> For VIRTIO, I'm not sure what the use case would be. Is there another
> driver that could bind to virtio-net devices, for example?
Yes.
>
> Giving a concrete example would be useful to help people understand why
> this is necessary.
See example in my v2.
-Max
>
> Stefan
next prev parent reply other threads:[~2025-12-09 15:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 14:39 [PATCH 1/1] virtio: add driver_override support Max Gurtovoy
2025-12-08 15:54 ` Stefan Hajnoczi
2025-12-08 16:18 ` Max Gurtovoy
2025-12-09 13:59 ` Stefan Hajnoczi
2025-12-09 15:12 ` Max Gurtovoy [this message]
2025-12-08 21:12 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=59d5c4c0-1679-435b-9c19-7778845331bf@nvidia.com \
--to=mgurtovoy@nvidia.com \
--cc=aaptel@nvidia.com \
--cc=aevdaev@nvidia.com \
--cc=mst@redhat.com \
--cc=oren@nvidia.com \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).