From: Changpeng Liu <changpeng.liu@intel.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, stefanha@redhat.com, changpeng.liu@intel.com
Subject: [Qemu-devel] [PATCH] vhost-blk: turn on pre-defined RO feature bit
Date: Sat, 19 May 2018 06:20:16 +0800 [thread overview]
Message-ID: <1526682016-17336-1-git-send-email-changpeng.liu@intel.com> (raw)
Read only feature shouldn't be negotiable, because if the
backend device reported Read only feature supported, QEMU
host driver shouldn't change backend's RO attribute.
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
---
hw/block/vhost-user-blk.c | 5 +----
include/hw/virtio/vhost-user-blk.h | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
index 262baca..cdc54dd 100644
--- a/hw/block/vhost-user-blk.c
+++ b/hw/block/vhost-user-blk.c
@@ -204,13 +204,11 @@ static uint64_t vhost_user_blk_get_features(VirtIODevice *vdev,
virtio_add_feature(&features, VIRTIO_BLK_F_TOPOLOGY);
virtio_add_feature(&features, VIRTIO_BLK_F_BLK_SIZE);
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->config_ro) {
- virtio_add_feature(&features, VIRTIO_BLK_F_RO);
- }
if (s->num_queues > 1) {
virtio_add_feature(&features, VIRTIO_BLK_F_MQ);
}
@@ -322,7 +320,6 @@ static Property vhost_user_blk_properties[] = {
DEFINE_PROP_UINT16("num-queues", VHostUserBlk, num_queues, 1),
DEFINE_PROP_UINT32("queue-size", VHostUserBlk, queue_size, 128),
DEFINE_PROP_BIT("config-wce", VHostUserBlk, config_wce, 0, true),
- DEFINE_PROP_BIT("config-ro", VHostUserBlk, config_ro, 0, false),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/include/hw/virtio/vhost-user-blk.h b/include/hw/virtio/vhost-user-blk.h
index 5804cc9..8c7c79b 100644
--- a/include/hw/virtio/vhost-user-blk.h
+++ b/include/hw/virtio/vhost-user-blk.h
@@ -34,7 +34,6 @@ typedef struct VHostUserBlk {
uint16_t num_queues;
uint32_t queue_size;
uint32_t config_wce;
- uint32_t config_ro;
struct vhost_dev dev;
} VHostUserBlk;
--
1.9.3
next reply other threads:[~2018-05-18 22:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-18 22:20 Changpeng Liu [this message]
2018-05-22 13:11 ` [Qemu-devel] [PATCH] vhost-blk: turn on pre-defined RO feature bit Stefan Hajnoczi
2018-05-22 14:39 ` Liu, Changpeng
2018-05-25 10:19 ` Stefan Hajnoczi
2018-05-27 23:56 ` Liu, Changpeng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1526682016-17336-1-git-send-email-changpeng.liu@intel.com \
--to=changpeng.liu@intel.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).