[PATCH 2/4] um: virtio_uml: use smaller virtqueue sizes for VIRTIO_ID_SOUND

Johannes Berg johannes at sipsolutions.net
Thu Nov 7 09:01:51 PST 2024


On Sun, 2024-11-03 at 22:28 +0100, Benjamin Berg wrote:
> From: Benjamin Berg <benjamin.berg at intel.com>
> 
> It appears that the different vhost device implementations use different
> sizes of the virtual queues. Add device specific limitations (for now,
> only for sound), to ensure that we do not get disconnected unexpectedly.

I'm not convinced this makes sense. If anything, it's a workaround for
some specific userspace, but ... do we care enough and not let them fix
it?

The protocol [1] basically says we decide on the size (see
VHOST_USER_SET_VRING_NUM) and the device doesn't even need to allocate
the memory, that's on us?

[1] https://qemu-project.gitlab.io/qemu/interop/vhost-user.html

So maybe let's see what they were thinking? I'm not sure it's important
enough right now to have this working to apply such a workaround without
some further discussion?

On PCI it seems that you can and should query the desired queue size
(see e.g. vp_modern_get_queue_size), but with vhost-user that doesn't
seem to be supported at all, so there isn't really a good thing we could
do in that sense.

johannes



More information about the linux-um mailing list