From: Changpeng Liu <changpeng.liu@intel.com>
To: qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org, changpeng.liu@intel.com
Subject: [PATCH 2/2] hw/vhost-user-scsi|blk: set `supports_config` flag correctly
Date: Wed, 25 May 2022 20:55:40 +0800 [thread overview]
Message-ID: <20220525125540.50979-2-changpeng.liu@intel.com> (raw)
In-Reply-To: <20220525125540.50979-1-changpeng.liu@intel.com>
Currently vhost-user-scsi driver doesn't allow to change
the configuration space of virtio_scsi, while vhost-user-blk
support that, so here we set the flag in vhost-user-blk driver
and unset it in vhost-user-scsi.
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
---
hw/block/vhost-user-blk.c | 1 +
hw/scsi/vhost-user-scsi.c | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
index 5dca4eab09..9117222456 100644
--- a/hw/block/vhost-user-blk.c
+++ b/hw/block/vhost-user-blk.c
@@ -337,6 +337,7 @@ static int vhost_user_blk_connect(DeviceState *dev, Error **errp)
vhost_dev_set_config_notifier(&s->dev, &blk_ops);
+ s->vhost_user.supports_config = true;
ret = vhost_dev_init(&s->dev, &s->vhost_user, VHOST_BACKEND_TYPE_USER, 0,
errp);
if (ret < 0) {
diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c
index 9be21d07ee..1b2f7eed98 100644
--- a/hw/scsi/vhost-user-scsi.c
+++ b/hw/scsi/vhost-user-scsi.c
@@ -121,7 +121,6 @@ static void vhost_user_scsi_realize(DeviceState *dev, Error **errp)
vsc->dev.backend_features = 0;
vqs = vsc->dev.vqs;
- s->vhost_user.supports_config = true;
ret = vhost_dev_init(&vsc->dev, &s->vhost_user,
VHOST_BACKEND_TYPE_USER, 0, errp);
if (ret < 0) {
--
2.21.3
next prev parent reply other threads:[~2022-05-25 14:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 12:55 [PATCH 1/2] hw/virtio/vhost-user: don't use uninitialized variable Changpeng Liu
2022-05-25 12:55 ` Changpeng Liu [this message]
2022-05-31 5:40 ` [PATCH 2/2] hw/vhost-user-scsi|blk: set `supports_config` flag correctly Raphael Norwitz
2022-05-31 5:21 ` [PATCH 1/2] hw/virtio/vhost-user: don't use uninitialized variable Raphael Norwitz
2022-05-31 14:45 ` Alex Bennée
2022-06-01 0:58 ` Liu, Changpeng
2022-06-02 8:27 ` Alex Bennée
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=20220525125540.50979-2-changpeng.liu@intel.com \
--to=changpeng.liu@intel.com \
--cc=alex.bennee@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).