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 <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2021-05-20 23:39:28 +02:00
parent b76e0b358f
commit c39d43dee1

View File

@ -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 {