[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] block/vhost-user-blk: Fix hang on boot for some odd guests
From: |
Andrey Ryabinin |
Subject: |
[PATCH] block/vhost-user-blk: Fix hang on boot for some odd guests |
Date: |
Mon, 10 Apr 2023 10:35:09 +0200 |
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
- [PATCH] block/vhost-user-blk: Fix hang on boot for some odd guests,
Andrey Ryabinin <=