[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/55] vhost-user-blk: make 'config_wce' part of 'host_features'
From: |
Michael S. Tsirkin |
Subject: |
[PULL 23/55] vhost-user-blk: make 'config_wce' part of 'host_features' |
Date: |
Mon, 10 Oct 2022 13:30:19 -0400 |
From: Daniil Tatianin <d-tatianin@yandex-team.ru>
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>
---
include/hw/virtio/vhost-user-blk.h | 1 -
hw/block/vhost-user-blk.c | 6 ++----
2 files changed, 2 insertions(+), 5 deletions(-)
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;
diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
index 92bfe56b45..aa4831f27a 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);
}
@@ -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,
--
MST
- [PULL 13/55] tests/qtest: use qos_printf instead of g_test_message, (continued)
- [PULL 13/55] tests/qtest: use qos_printf instead of g_test_message, Michael S. Tsirkin, 2022/10/10
- [PULL 14/55] tests/qtest: catch unhandled vhost-user messages, Michael S. Tsirkin, 2022/10/10
- [PULL 15/55] tests/qtest: plain g_assert for VHOST_USER_F_PROTOCOL_FEATURES, Michael S. Tsirkin, 2022/10/10
- [PULL 16/55] tests/qtest: add assert to catch bad features, Michael S. Tsirkin, 2022/10/10
- [PULL 17/55] tests/qtest: implement stub for VHOST_USER_GET_CONFIG, Michael S. Tsirkin, 2022/10/10
- [PULL 18/55] tests/qtest: add a get_features op to vhost-user-test, Michael S. Tsirkin, 2022/10/10
- [PULL 19/55] tests/qtest: enable tests for virtio-gpio, Michael S. Tsirkin, 2022/10/10
- [PULL 20/55] virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size, Michael S. Tsirkin, 2022/10/10
- [PULL 21/55] virtio-blk: move config size params to virtio-blk-common, Michael S. Tsirkin, 2022/10/10
- [PULL 22/55] vhost-user-blk: make it possible to disable write-zeroes/discard, Michael S. Tsirkin, 2022/10/10
- [PULL 23/55] vhost-user-blk: make 'config_wce' part of 'host_features',
Michael S. Tsirkin <=
- [PULL 24/55] vhost-user-blk: dynamically resize config space based on features, Michael S. Tsirkin, 2022/10/10
- [PULL 25/55] tests/acpi: virt: allow acpi GTDT changes, Michael S. Tsirkin, 2022/10/10
- [PULL 26/55] acpi: arm/virt: build_gtdt: fix invalid 64-bit physical addresses, Michael S. Tsirkin, 2022/10/10
- [PULL 27/55] tests/acpi: virt: update ACPI GTDT binaries, Michael S. Tsirkin, 2022/10/10
- [PULL 28/55] mem/cxl-type3: Add sn option to provide serial number for PCI ecap, Michael S. Tsirkin, 2022/10/10
- [PULL 29/55] Revert "intel_iommu: Fix irqchip / X2APIC configuration checks", Michael S. Tsirkin, 2022/10/10