summaryrefslogtreecommitdiffstats
path: root/hw/scsi/vhost-user-scsi.c
diff options
context:
space:
mode:
authorAlex Bennée2022-03-21 16:30:36 +0100
committerMichael S. Tsirkin2022-05-16 10:38:40 +0200
commit56534930b5cd3a6c7259cfeba69f08ba28c8f62a (patch)
tree9792a01ca459e6134ae734e797384b59cf154c20 /hw/scsi/vhost-user-scsi.c
parentinclude/hw: start documenting the vhost API (diff)
downloadqemu-56534930b5cd3a6c7259cfeba69f08ba28c8f62a.tar.gz
qemu-56534930b5cd3a6c7259cfeba69f08ba28c8f62a.tar.xz
qemu-56534930b5cd3a6c7259cfeba69f08ba28c8f62a.zip
hw/virtio/vhost-user: don't suppress F_CONFIG when supported
Previously we would silently suppress VHOST_USER_PROTOCOL_F_CONFIG during the protocol negotiation if the QEMU stub hadn't implemented the vhost_dev_config_notifier. However this isn't the only way we can handle config messages, the existing vdc->get/set_config can do this as well. Lightly re-factor the code to check for both potential methods and instead of silently squashing the feature error out. It is unlikely that a vhost-user backend expecting to handle CONFIG messages will behave correctly if they never get sent. Fixes: 1c3e5a2617 ("vhost-user: back SET/GET_CONFIG requests with a protocol feature") Cc: Maxime Coquelin <maxime.coquelin@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220321153037.3622127-13-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/scsi/vhost-user-scsi.c')
-rw-r--r--hw/scsi/vhost-user-scsi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c
index 1b2f7eed98..9be21d07ee 100644
--- a/hw/scsi/vhost-user-scsi.c
+++ b/hw/scsi/vhost-user-scsi.c
@@ -121,6 +121,7 @@ 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) {