[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 4/5] vhost-user-blk: make 'config_wce' part of 'host_features'
From: |
Daniil Tatianin |
Subject: |
[PATCH v3 4/5] vhost-user-blk: make 'config_wce' part of 'host_features' |
Date: |
Tue, 6 Sep 2022 10:31:10 +0300 |
No reason to have this be a separate field. This also makes it more akin
to what the virtio-blk device does.
Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
---
hw/block/vhost-user-blk.c | 6 ++----
include/hw/virtio/vhost-user-blk.h | 1 -
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
index 4c9727e08c..0d916edefa 100644
--- a/hw/block/vhost-user-blk.c
+++ b/hw/block/vhost-user-blk.c
@@ -260,9 +260,6 @@ static uint64_t vhost_user_blk_get_features(VirtIODevice
*vdev,
virtio_add_feature(&features, VIRTIO_BLK_F_FLUSH);
virtio_add_feature(&features, VIRTIO_BLK_F_RO);
- if (s->config_wce) {
- virtio_add_feature(&features, VIRTIO_BLK_F_CONFIG_WCE);
- }
if (s->num_queues > 1) {
virtio_add_feature(&features, VIRTIO_BLK_F_MQ);
}
@@ -589,7 +586,8 @@ static Property vhost_user_blk_properties[] = {
DEFINE_PROP_UINT16("num-queues", VHostUserBlk, num_queues,
VHOST_USER_BLK_AUTO_NUM_QUEUES),
DEFINE_PROP_UINT32("queue-size", VHostUserBlk, queue_size, 128),
- DEFINE_PROP_BIT("config-wce", VHostUserBlk, config_wce, 0, true),
+ DEFINE_PROP_BIT64("config-wce", VHostUserBlk, parent_obj.host_features,
+ VIRTIO_BLK_F_CONFIG_WCE, true),
DEFINE_PROP_BIT64("discard", VHostUserBlk, parent_obj.host_features,
VIRTIO_BLK_F_DISCARD, true),
DEFINE_PROP_BIT64("write-zeroes", VHostUserBlk, parent_obj.host_features,
diff --git a/include/hw/virtio/vhost-user-blk.h
b/include/hw/virtio/vhost-user-blk.h
index 7c91f15040..ea085ee1ed 100644
--- a/include/hw/virtio/vhost-user-blk.h
+++ b/include/hw/virtio/vhost-user-blk.h
@@ -34,7 +34,6 @@ struct VHostUserBlk {
struct virtio_blk_config blkcfg;
uint16_t num_queues;
uint32_t queue_size;
- uint32_t config_wce;
struct vhost_dev dev;
struct vhost_inflight *inflight;
VhostUserState vhost_user;
--
2.25.1
- [PATCH v3 0/5] vhost-user-blk: dynamically resize config space based on features, Daniil Tatianin, 2022/09/06
- [PATCH v3 1/5] virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size, Daniil Tatianin, 2022/09/06
- [PATCH v3 4/5] vhost-user-blk: make 'config_wce' part of 'host_features',
Daniil Tatianin <=
- [PATCH v3 2/5] virtio-blk: move config size params to virtio-blk-common, Daniil Tatianin, 2022/09/06
- [PATCH v3 3/5] vhost-user-blk: make it possible to disable write-zeroes/discard, Daniil Tatianin, 2022/09/06
- [PATCH v3 5/5] vhost-user-blk: dynamically resize config space based on features, Daniil Tatianin, 2022/09/06
- Re: [PATCH v3 0/5] vhost-user-blk: dynamically resize config space based on features, Raphael Norwitz, 2022/09/07