qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user
@ 2023-01-31 19:10 Eugenio Perez Martin
  2023-01-31 19:11 ` Eugenio Perez Martin
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Eugenio Perez Martin @ 2023-01-31 19:10 UTC (permalink / raw)
  To: Maxime Coquelin, Jason Wang, Michael Tsirkin, Cindy Lu,
	Stefano Garzarella, qemu-level, Laurent Vivier, Juan Quintela

Hi,

The current approach of offering an emulated CVQ to the guest and map
the commands to vhost-user is not scaling well:
* Some devices already offer it, so the transformation is redundant.
* There is no support for commands with variable length (RSS?)

We can solve both of them by offering it through vhost-user the same
way as vhost-vdpa do. With this approach qemu needs to track the
commands, for similar reasons as vhost-vdpa: qemu needs to track the
device status for live migration. vhost-user should use the same SVQ
code for this, so we avoid duplications.

One of the challenges here is to know what virtqueue to shadow /
isolate. The vhost-user device may not have the same queues as the
device frontend:
* The first depends on the actual vhost-user device, and qemu fetches
it with VHOST_USER_GET_QUEUE_NUM at the moment.
* The qemu device frontend's is set by netdev queues= cmdline parameter in qemu

For the device, the CVQ is the last one it offers, but for the guest
it is the last one offered in config space.

To create a new vhost-user command to decrease that maximum number of
queues may be an option. But we can do it without adding more
commands, remapping the CVQ index at virtqueue setup. I think it
should be doable using (struct vhost_dev).vq_index and maybe a few
adjustments here and there.

Thoughts?

Thanks!



^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2023-03-10 10:50 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-31 19:10 Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user Eugenio Perez Martin
2023-01-31 19:11 ` Eugenio Perez Martin
2023-01-31 21:32   ` Michael S. Tsirkin
2023-02-01  3:29   ` Jason Wang
2023-02-01  7:49     ` Eugenio Perez Martin
2023-02-01 10:44       ` Michael S. Tsirkin
2023-02-02  3:41       ` Jason Wang
2023-02-02 18:32         ` Eugenio Perez Martin
2023-02-01 10:53     ` Michael S. Tsirkin
2023-02-01  3:27 ` Jason Wang
2023-02-01  6:55   ` Eugenio Perez Martin
2023-02-02  3:02     ` Jason Wang
2023-02-01 11:14 ` Maxime Coquelin
2023-02-01 11:19   ` Eugenio Perez Martin
2023-03-02  8:48     ` Maxime Coquelin
2023-02-01 11:20   ` Michael S. Tsirkin
2023-02-01 11:48     ` Eugenio Perez Martin
2023-02-02  3:44       ` Jason Wang
2023-02-02 18:37         ` Eugenio Perez Martin
2023-03-08 10:33     ` Maxime Coquelin
2023-03-08 12:15       ` Michael S. Tsirkin
2023-03-10 10:33         ` Maxime Coquelin
2023-03-10 10:49           ` Michael S. Tsirkin

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).