All of lore.kernel.org
 help / color / mirror / Atom feed
From: Parav Pandit via Virtualization <virtualization@lists.linux-foundation.org>
To: Stefano Garzarella <sgarzare@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	Michael Tsirkin <mst@redhat.com>
Cc: Eli Cohen <elic@nvidia.com>,
	Linux Virtualization <virtualization@lists.linux-foundation.org>
Subject: RE: vDPA bus driver selection
Date: Wed, 27 Oct 2021 15:21:15 +0000	[thread overview]
Message-ID: <PH0PR12MB548115FD6354339B41A11CE3DC859@PH0PR12MB5481.namprd12.prod.outlook.com> (raw)
In-Reply-To: <CAGxU2F7r7=P8E-f1Nnm2h18S-hL8YBt7s=J81fkQcrAdpZ-KwQ@mail.gmail.com>

Hi Stefano,

> From: Stefano Garzarella <sgarzare@redhat.com>
> Sent: Wednesday, October 27, 2021 8:04 PM
> 
> 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?
> 
One option is, user keeps the drivers_autoprobe disabled for the vdpa bus using,

$ vdpa/vdpa dev add mgmtdev vdpasim_net name vdpa0 mac 00:11:22:33:44:55
$ echo 0 > /sys/bus/vdpa/drivers_autoprobe

And after vdpa device creation, it manually binds to the desired driver such as,

$ echo vdpa0 > /sys/bus/vdpa/drivers/virtio_vdpa/bind
Or
$ echo vdpa0 > /sys/bus/vdpa/drivers/vhost_vdpa/bind

In an case of VDUSE, it makes more sense to bind to the one of the above driver after user space has connected the use space backend to the kernel device.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2021-10-27 15:21 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 [this message]
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

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=PH0PR12MB548115FD6354339B41A11CE3DC859@PH0PR12MB5481.namprd12.prod.outlook.com \
    --to=virtualization@lists.linux-foundation.org \
    --cc=elic@nvidia.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=parav@nvidia.com \
    --cc=sgarzare@redhat.com \
    /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 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.