[Virtio-fs] [PATCH] vhost-user-fs: fix features handling
Stefan Hajnoczi
stefanha at redhat.com
Tue Apr 13 08:47:14 UTC 2021
On Thu, Apr 08, 2021 at 10:55:34PM +0300, Anton Kuchin wrote:
> Make virtio-fs take into account server capabilities.
>
> Just returning requested features assumes they all of then are implemented
> by server and results in setting unsupported configuration if some of them
> are absent.
>
> Signed-off-by: Anton Kuchin <antonkuchin at yandex-team.ru>
> ---
> hw/virtio/vhost-user-fs.c | 17 +++++++++++++----
> 1 file changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/hw/virtio/vhost-user-fs.c b/hw/virtio/vhost-user-fs.c
> index ac4fc34b36..6cf983ba0e 100644
> --- a/hw/virtio/vhost-user-fs.c
> +++ b/hw/virtio/vhost-user-fs.c
> @@ -24,6 +24,14 @@
> #include "monitor/monitor.h"
> #include "sysemu/sysemu.h"
>
> +static const int user_feature_bits[] = {
> + VIRTIO_F_VERSION_1,
> + VIRTIO_RING_F_INDIRECT_DESC,
> + VIRTIO_RING_F_EVENT_IDX,
> + VIRTIO_F_NOTIFY_ON_EMPTY,
> + VHOST_INVALID_FEATURE_BIT
> +};
Please add:
VIRTIO_F_RING_PACKED
VIRTIO_F_IOMMU_PLATFORM
QEMU's virtiofsd does not enable either of these for now, but it's worth
allowing the vhost-user device backend to participate in negotiation so
that this can change in the future (or alternative virtiofsd
implementations can support these features).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virtio-fs/attachments/20210413/fa0dc11a/attachment.sig>
More information about the Virtio-fs
mailing list