[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 29/30] vhost-user: only set slave channel for first vq
From: |
Michael S. Tsirkin |
Subject: |
[PULL v2 29/30] vhost-user: only set slave channel for first vq |
Date: |
Wed, 26 Feb 2020 04:07:58 -0500 |
From: Adrian Moreno <address@hidden>
When multiqueue is enabled, a vhost_dev is created for each queue
pair. However, only one slave channel is needed.
Fixes: 4bbeeba023f2 (vhost-user: add slave-req-fd support)
Cc: address@hidden
Signed-off-by: Adrian Moreno <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/virtio/vhost-user.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 2e81f5514f..35baf4f347 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -1458,9 +1458,11 @@ static int vhost_user_backend_init(struct vhost_dev
*dev, void *opaque)
"VHOST_USER_PROTOCOL_F_LOG_SHMFD feature.");
}
- err = vhost_setup_slave_channel(dev);
- if (err < 0) {
- return err;
+ if (dev->vq_index == 0) {
+ err = vhost_setup_slave_channel(dev);
+ if (err < 0) {
+ return err;
+ }
}
u->postcopy_notifier.notify = vhost_user_postcopy_notifier;
--
MST
- [PULL v2 19/30] virtio-iommu-pci: Add virtio iommu pci support, (continued)
- [PULL v2 19/30] virtio-iommu-pci: Add virtio iommu pci support, Michael S. Tsirkin, 2020/02/26
- [PULL v2 20/30] hw/arm/virt: Add the virtio-iommu device tree mappings, Michael S. Tsirkin, 2020/02/26
- [PULL v2 21/30] MAINTAINERS: add virtio-iommu related files, Michael S. Tsirkin, 2020/02/26
- [PULL v2 22/30] libvhost-user: implement VHOST_USER_PROTOCOL_F_REPLY_ACK, Michael S. Tsirkin, 2020/02/26
- [PULL v2 23/30] libvhost-user-glib: fix VugDev main fd cleanup, Michael S. Tsirkin, 2020/02/26
- [PULL v2 24/30] libvhost-user-glib: use g_main_context_get_thread_default(), Michael S. Tsirkin, 2020/02/26
- [PULL v2 25/30] libvhost-user: handle NOFD flag in call/kick/err better, Michael S. Tsirkin, 2020/02/26
- [PULL v2 26/30] docs: vhost-user: add in-band kick/call messages, Michael S. Tsirkin, 2020/02/26
- [PULL v2 27/30] libvhost-user: implement in-band notifications, Michael S. Tsirkin, 2020/02/26
- [PULL v2 28/30] acpi: cpuhp: document CPHP_GET_CPU_ID_CMD command, Michael S. Tsirkin, 2020/02/26
- [PULL v2 29/30] vhost-user: only set slave channel for first vq,
Michael S. Tsirkin <=
- [PULL v2 30/30] Fixed assert in vhost_user_set_mem_table_postcopy, Michael S. Tsirkin, 2020/02/26
- Re: [PULL v2 00/30] virtio, pc: fixes, features, Michael S. Tsirkin, 2020/02/27