qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block/vhost-user-blk: Fix hang on boot for some odd guests
@ 2023-04-10  8:35 Andrey Ryabinin
  2023-04-10 15:39 ` Andrey Ryabinin
  0 siblings, 1 reply; 8+ messages in thread
From: Andrey Ryabinin @ 2023-04-10  8:35 UTC (permalink / raw)
  To: Raphael Norwitz, Michael S. Tsirkin, Kevin Wolf, Hanna Reitz,
	qemu-block, qemu-devel
  Cc: Yongji Xie, Chai Wen, Ni Xun, d-tatianin, yc-core,
	Andrey Ryabinin

Some guests hang on boot when using the vhost-user-blk-pci device,
but boot normally when using the virtio-blk device. The problem occurs
because the guest advertises VIRTIO_F_VERSION_1 but kicks the virtqueue
before setting VIRTIO_CONFIG_S_DRIVER_OK, causing vdev->start_on_kick to
be false in vhost_user_blk_handle_output() and preventing the device from
starting.

Fix this by removing the check for vdev->start_on_kick to ensure
that the device starts after the kick. This aligns the behavior of
'vhost-user-blk-pci' device with 'virtio-blk' as it does the similar
thing in its virtio_blk_handle_output() function.

Fixes: 110b9463d5c8 ("vhost-user-blk: start vhost when guest kicks")
Signed-off-by: Andrey Ryabinin <arbn@yandex-team.com>
---
 hw/block/vhost-user-blk.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
index aff4d2b8cbd..448ead448f3 100644
--- a/hw/block/vhost-user-blk.c
+++ b/hw/block/vhost-user-blk.c
@@ -279,10 +279,6 @@ static void vhost_user_blk_handle_output(VirtIODevice *vdev, VirtQueue *vq)
     Error *local_err = NULL;
     int i, ret;
 
-    if (!vdev->start_on_kick) {
-        return;
-    }
-
     if (!s->connected) {
         return;
     }
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-04-21  8:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-10  8:35 [PATCH] block/vhost-user-blk: Fix hang on boot for some odd guests Andrey Ryabinin
2023-04-10 15:39 ` Andrey Ryabinin
2023-04-18  5:13   ` Raphael Norwitz
2023-04-18  6:17     ` Michael S. Tsirkin
2023-04-18 17:20       ` Andrey Ryabinin
2023-04-21  8:06         ` Michael S. Tsirkin
2023-04-18 16:37     ` Andrey Ryabinin
2023-04-18 16:46       ` Michael S. Tsirkin

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).