mirror of https://github.com/xemu-project/xemu.git
vhost-user-blk: make 'config_wce' part of 'host_features'
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> Message-Id: <20220906073111.353245-5-d-tatianin@yandex-team.ru> Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
246db16d43
commit
f1c25f295d
|
@ -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);
|
||||
}
|
||||
|
@ -595,7 +592,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,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue