From 840318752f3d4611f46378395d67add885f422e0 Mon Sep 17 00:00:00 2001 From: BillXiang <1373760142@qq.com> Date: Thu, 18 Jul 2024 15:29:07 +0800 Subject: [PATCH] vhsot-user: only read reply of SET_LOG_BASE from vq 0 We have added VHOST_USER_SET_LOG_BASE to vhost_user_one_time_request in https://gitee.com/openeuler/qemu/pulls/913 and will not send this message for other vqs. Signed-off-by: BillXiang <1373760142@qq.com> --- hw/virtio/vhost-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index c97ea2544d..f10620494b 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -534,7 +534,7 @@ static int vhost_user_set_log_base(struct vhost_dev *dev, uint64_t base, return ret; } - if (shmfd) { + if (shmfd && (dev->vq_index == 0)) { msg.hdr.size = 0; ret = vhost_user_read(dev, &msg); if (ret < 0) { -- 2.41.0.windows.1