From: Felipe Franciosi <felipe@nutanix.com>
To: Stefan Hajnoczi <stefanha@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
Felipe Franciosi <felipe@nutanix.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [PATCH] vhost-user-scsi: implement handle_output
Date: Thu, 17 Oct 2019 16:39:44 +0000 [thread overview]
Message-ID: <20191017163859.23184-1-felipe@nutanix.com> (raw)
Originally, vhost-user-scsi did not implement a handle_output callback
as that didn't seem necessary. Turns out it is.
Depending on which other devices are presented to a VM, SeaBIOS may
decide to map vhost-user-scsi devices on the 64-bit range of the address
space. As a result, SeaBIOS will kick VQs via the config space. Those
land on Qemu (not the vhost backend) and are missed, causing the VM not
to boot. This fixes the issue by getting Qemu to post the notification.
Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
---
hw/scsi/vhost-user-scsi.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c
index 6a6c15dd32..13278ed151 100644
--- a/hw/scsi/vhost-user-scsi.c
+++ b/hw/scsi/vhost-user-scsi.c
@@ -62,8 +62,9 @@ static void vhost_user_scsi_set_status(VirtIODevice *vdev, uint8_t status)
}
}
-static void vhost_dummy_handle_output(VirtIODevice *vdev, VirtQueue *vq)
+static void vhost_handle_output(VirtIODevice *vdev, VirtQueue *vq)
{
+ event_notifier_set(virtio_queue_get_host_notifier(vq));
}
static void vhost_user_scsi_realize(DeviceState *dev, Error **errp)
@@ -80,9 +81,9 @@ static void vhost_user_scsi_realize(DeviceState *dev, Error **errp)
return;
}
- virtio_scsi_common_realize(dev, vhost_dummy_handle_output,
- vhost_dummy_handle_output,
- vhost_dummy_handle_output, &err);
+ virtio_scsi_common_realize(dev, vhost_handle_output,
+ vhost_handle_output,
+ vhost_handle_output, &err);
if (err != NULL) {
error_propagate(errp, err);
return;
--
2.20.1
next reply other threads:[~2019-10-17 17:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-17 16:39 Felipe Franciosi [this message]
2019-10-18 2:59 ` [PATCH] vhost-user-scsi: implement handle_output Yongji Xie
2019-10-18 11:14 ` Felipe Franciosi
2019-10-21 4:01 ` Yongji Xie
2019-10-21 8:00 ` Felipe Franciosi
2019-10-21 8:19 ` Liu, Changpeng
2019-10-21 10:41 ` Yongji Xie
2019-10-22 15:34 ` Stefan Hajnoczi
2019-10-21 9:51 ` Yongji Xie
2019-10-21 11:20 ` Stefan Hajnoczi
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=20191017163859.23184-1-felipe@nutanix.com \
--to=felipe@nutanix.com \
--cc=alex.williamson@redhat.com \
--cc=dgilbert@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).