qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 4/7] vhost: involve device backends in feature negotiation


From: Jason Wang
Subject: Re: [PATCH v2 4/7] vhost: involve device backends in feature negotiation
Date: Wed, 10 Jun 2020 13:53:57 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0


On 2020/6/10 下午12:15, Michael S. Tsirkin wrote:
On Wed, Jun 10, 2020 at 11:21:50AM +0800, Jason Wang wrote:
On 2020/6/10 上午2:07, Michael S. Tsirkin wrote:
+/*
+ * Default vhost_get_features() feature bits for existing device types that do
+ * not define their own.
+ *
+ * This is a workaround for existing device types, do not use this in new vhost
+ * device types. Explicitly define a list of feature bits instead.
+ *
+ * The following feature bits are excluded because libvhost-user device
+ * backends did not advertise them for a long time. Therefore we cannot detect
+ * their presence. Instead we assume they are always supported by the device
+ * backend:
+ * VIRTIO_F_NOTIFY_ON_EMPTY
+ * VIRTIO_F_ANY_LAYOUT
+ * VIRTIO_F_VERSION_1
+ * VIRTIO_RING_F_INDIRECT_DESC
+ * VIRTIO_RING_F_EVENT_IDX
Weird. I remember that it's common for vhost-user not to set
VIRTIO_RING_F_INDIRECT_DESC - they have huge queues so
don't need it and inline descriptors give them better
performance.

So what's going on here?

I guess one reason is to support live migration between vhost-user and
vhost-net.

Thanks

But how can we force-enable features backend doesn't want to enable?


We can't and the code just forces qemu to validate VIRTIO_RING_F_INDIRECT_DESC for each vhost backends instead of assuming the support silently.

Thanks


This may or may not break backends ...
I would rather just be strict and ask backends to fix their feature
bits. See user_feature_bits in hw/net/vhost-net.c which supports
all these features.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]