diff options
author | Stefan Hajnoczi | 2020-05-29 18:13:38 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2020-06-12 16:17:06 +0200 |
commit | a9a5c473d25d83bcdad27d97e5fb451950ee894a (patch) | |
tree | d0e7564428aa96c3a3075a875afd3b03dd00e8dd /contrib/vhost-user-blk | |
parent | Lift max ram slots limit in libvhost-user (diff) | |
download | qemu-a9a5c473d25d83bcdad27d97e5fb451950ee894a.tar.gz qemu-a9a5c473d25d83bcdad27d97e5fb451950ee894a.tar.xz qemu-a9a5c473d25d83bcdad27d97e5fb451950ee894a.zip |
libvhost-user: advertise vring features
libvhost-user implements several vring features without advertising
them. There is no way for the vhost-user master to detect support for
these features.
Things more or less work today because QEMU assumes the vhost-user
backend always implements certain feature bits like
VIRTIO_RING_F_EVENT_IDX. This is not documented anywhere.
This patch explicitly advertises features implemented in libvhost-user
so that the vhost-user master does not need to make undocumented
assumptions.
Feature bits that libvhost-user now advertises can be removed from
vhost-user-blk.c. Devices should not be responsible for advertising
vring feature bits, that is libvhost-user's job.
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200529161338.456017-1-stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'contrib/vhost-user-blk')
-rw-r--r-- | contrib/vhost-user-blk/vhost-user-blk.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c index 6fd91c7e99..25eccd02b5 100644 --- a/contrib/vhost-user-blk/vhost-user-blk.c +++ b/contrib/vhost-user-blk/vhost-user-blk.c @@ -382,9 +382,7 @@ vub_get_features(VuDev *dev) 1ull << VIRTIO_BLK_F_DISCARD | 1ull << VIRTIO_BLK_F_WRITE_ZEROES | #endif - 1ull << VIRTIO_BLK_F_CONFIG_WCE | - 1ull << VIRTIO_F_VERSION_1 | - 1ull << VHOST_USER_F_PROTOCOL_FEATURES; + 1ull << VIRTIO_BLK_F_CONFIG_WCE; if (vdev_blk->enable_ro) { features |= 1ull << VIRTIO_BLK_F_RO; |