virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Garzarella <sgarzare@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Eli Cohen <elic@nvidia.com>,
	Linux Virtualization <virtualization@lists.linux-foundation.org>
Subject: Re: vDPA bus driver selection
Date: Thu, 28 Oct 2021 11:34:56 +0200	[thread overview]
Message-ID: <20211028093456.4vqurdmb2vw2kdhq@steredhat> (raw)
In-Reply-To: <20211027144048-mutt-send-email-mst@kernel.org>

On Wed, Oct 27, 2021 at 02:45:15PM -0400, Michael S. Tsirkin wrote:
>On Wed, Oct 27, 2021 at 04:33:50PM +0200, Stefano Garzarella wrote:
>> Hi folks,
>> I was trying to understand if we have a way to specify which vDPA bus
>> driver (e.g. vhost-vdpa, virtio-vdpa) a device should use.
>> IIUC we don't have it, and the first registered driver is used when a
>> new device is registered.
>>
>> I was thinking if it makes sense to extend the management API to
>> specify which bus driver to use for a device. A use case could be for
>> example a single host handling VMs and bare-metal containers, so we
>> would have both virtio-vdpa and vhost-vdpa loaded and we want to
>> attach some devices to VMs through vhost-vdpa and others to containers
>> through virtio-vdpa.
>>
>> What do you think?
>>
>> I can prepare an RFC with some code, the idea is to use the .match
>> callback of "struct bus_type" to use a driver instead of the other,
>> and extend netlink API to specify the vDPA bus driver name to use.
>>
>> Thanks,
>> Stefano
>
>So I think that doing this at create time is somewhat limited.
>For example a great way to do migration could be to unbind
>device from VM then bind virtio on the host to it, then
>bind macvtap to that.

Yep, make sense!

>
>Ideas on how to allow that?

Maybe we can split the device creation and the attach (probe) in two 
APIs, then we can add a detach API to allow changing bus.

Anyway I need to check the code better, but I think it's doable.

Stefano

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

      reply	other threads:[~2021-10-28  9:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27 14:33 vDPA bus driver selection Stefano Garzarella
2021-10-27 15:21 ` Parav Pandit via Virtualization
2021-10-27 15:47   ` Stefano Garzarella
2021-10-27 15:56     ` Parav Pandit via Virtualization
2021-10-28  9:37       ` Stefano Garzarella
2021-10-28  9:48         ` Parav Pandit via Virtualization
2021-10-29  2:34           ` Jason Wang
2021-10-29 14:41             ` Stefano Garzarella
2021-10-29 15:41               ` Parav Pandit via Virtualization
2021-10-27 20:16   ` Michael S. Tsirkin
2021-10-28  2:24     ` Jason Wang
2021-10-28  9:47       ` Stefano Garzarella
2021-10-29  2:31         ` Jason Wang
2021-10-29 14:32           ` Stefano Garzarella
2021-10-28  3:10     ` Parav Pandit via Virtualization
2021-10-27 18:45 ` Michael S. Tsirkin
2021-10-28  9:34   ` Stefano Garzarella [this message]

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=20211028093456.4vqurdmb2vw2kdhq@steredhat \
    --to=sgarzare@redhat.com \
    --cc=elic@nvidia.com \
    --cc=mst@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).