On Tue, 28 May 2024 17:32:26 +0200
Stefano Garzarella <sgarz...@redhat.com> wrote:

> >1) The uses is explicitly asking for a vhost device and giving the user
> >a non vhost device is not an option.  
> 
> I didn't get this point :-( can you elaborate?

I was thinking along the lines: QEMU gets told what devices to
provision, and that includes things like what virtio features,
and what kind of a backend.

In this example, the default for vsock-vhost is no VIRTIO_F_RING_PACKED,
but if we tell QEMU to create a vsock-vhost device with the feature
VIRTIO_F_RING_PACKED, things go south in a not nice way.

Given that vhost not supporting VIRTIO_F_RING_PACKED as of today is a
fact of life we must accept, there are multiple ways how such a situation
can be handled.

For instance vhost-net is handling this by the device not offering the
VIRTIO_F_RING_PACKED feature. This is at least what I think I have
observed, but I would not mind somebody confirming it. But for the sake
of the argument, let us look at other options.

The straightforward one would be to not realize the device, because we
can't provide what we have been asked to provide. And this actually
makes me think about migration! What would happen, were we to
eventually introduce, packed to vhost and vhost net, and then attempt to
migrate between a host that has this new feature and host that has not. I
guess things would pretty much blow up in a very unpleasant way!

Then for some devices, at least in theory, it might be possible to
abandon not the feature but the backend. Along the lines we were asked to
provide the feature X with backend Y but since backend Y does not
support that feature and backed Z does, we will determistically go
with backend Z. But IMHO this is a purely theoretical consideration, and
we shall not go this way.

In any case if we are asked to provide with properties such that we
can't actually do that, something has to go out of the window: either
some of the properties, or the entire device.

Regards,
Halil


Reply via email to