Commit eb15d158 authored by suhua's avatar suhua Committed by Tomasz Zawadzki
Browse files

vhost: Add VIRTIO_F_ANY_LAYOUT feature for vhost



In the qemu virtualization environment, when the virtio driver of the
windows image is upgraded to virtio-win 0.1.185, and virtio uses
legacy mode. In the negotiation stage of vhost, qemu's host_features
will enable VIRTIO_F_ANY_LAYOUT, and guest_features will also enable
this feature, because qemu's feature is a superset, so the feature
will be passed to the spdk side through the set feature process,
which leads to "VHOST_CONFIG: Processing VHOST_USER_SET_FEATURES
failed. VHOST_CONFIG: vhost message handling failed.", so we enable
this bit for spdk vhost.

Signed-off-by: default avatarsuhua <suhua1@kingsoft.com>
Signed-off-by: default avatarlizhaoxin <lizhaoxin1@kingsoft.com>
Change-Id: I27323bf5a03dce774c8a74cfb070ddd43be05534
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12300


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 7a31179f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -75,7 +75,8 @@
	(1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | \
	(1ULL << VIRTIO_RING_F_EVENT_IDX) | \
	(1ULL << VIRTIO_RING_F_INDIRECT_DESC) | \
	(1ULL << VIRTIO_F_RING_PACKED))
	(1ULL << VIRTIO_F_RING_PACKED) | \
	(1ULL << VIRTIO_F_ANY_LAYOUT))

#define SPDK_VHOST_DISABLED_FEATURES ((1ULL << VIRTIO_RING_F_EVENT_IDX) | \
	(1ULL << VIRTIO_F_NOTIFY_ON_EMPTY))