From c39d43dee1501086d71a03cdf12f5342af910730 Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Thu, 20 May 2021 23:39:28 +0200 Subject: [PATCH] vhost_user_blk: Extend list of supported virtio features Extend the current list of available virtio features in order to make it work correctly with the VMM side. Signed-off-by: Sebastien Boeuf --- vhost_user_block/src/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vhost_user_block/src/lib.rs b/vhost_user_block/src/lib.rs index e96056664..c1a4936c4 100644 --- a/vhost_user_block/src/lib.rs +++ b/vhost_user_block/src/lib.rs @@ -283,11 +283,14 @@ impl VhostUserBackend for VhostUserBlkBackend { } fn features(&self) -> u64 { - let mut avail_features = 1 << VIRTIO_BLK_F_MQ + let mut avail_features = 1 << VIRTIO_BLK_F_SEG_MAX + | 1 << VIRTIO_BLK_F_BLK_SIZE + | 1 << VIRTIO_BLK_F_FLUSH + | 1 << VIRTIO_BLK_F_TOPOLOGY + | 1 << VIRTIO_BLK_F_MQ | 1 << VIRTIO_BLK_F_CONFIG_WCE | 1 << VIRTIO_RING_F_EVENT_IDX | 1 << VIRTIO_F_VERSION_1 - | 1 << VIRTIO_BLK_F_FLUSH | VhostUserVirtioFeatures::PROTOCOL_FEATURES.bits(); if self.rdonly {