[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 29/32] vhost-user: only set slave channel for first vq
From: |
Michael S. Tsirkin |
Subject: |
[PULL 29/32] vhost-user: only set slave channel for first vq |
Date: |
Tue, 25 Feb 2020 10:14:51 -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 17/32] virtio-iommu: Implement fault reporting, (continued)
- [PULL 17/32] virtio-iommu: Implement fault reporting, Michael S. Tsirkin, 2020/02/25
- [PULL 18/32] virtio-iommu: Support migration, Michael S. Tsirkin, 2020/02/25
- [PULL 19/32] virtio-iommu-pci: Add virtio iommu pci support, Michael S. Tsirkin, 2020/02/25
- [PULL 20/32] hw/arm/virt: Add the virtio-iommu device tree mappings, Michael S. Tsirkin, 2020/02/25
- [PULL 21/32] MAINTAINERS: add virtio-iommu related files, Michael S. Tsirkin, 2020/02/25
- [PULL 23/32] libvhost-user-glib: fix VugDev main fd cleanup, Michael S. Tsirkin, 2020/02/25
- [PULL 24/32] libvhost-user-glib: use g_main_context_get_thread_default(), Michael S. Tsirkin, 2020/02/25
- [PULL 25/32] libvhost-user: handle NOFD flag in call/kick/err better, Michael S. Tsirkin, 2020/02/25
- [PULL 27/32] libvhost-user: implement in-band notifications, Michael S. Tsirkin, 2020/02/25
- [PULL 28/32] acpi: cpuhp: document CPHP_GET_CPU_ID_CMD command, Michael S. Tsirkin, 2020/02/25
- [PULL 29/32] vhost-user: only set slave channel for first vq,
Michael S. Tsirkin <=
- [PULL 30/32] tests/vhost-user-bridge: move to contrib/, Michael S. Tsirkin, 2020/02/25
- [PULL 31/32] virtiofsd: add it to the tools list, Michael S. Tsirkin, 2020/02/25
- [PULL 32/32] Fixed assert in vhost_user_set_mem_table_postcopy, Michael S. Tsirkin, 2020/02/25
- [PULL 22/32] libvhost-user: implement VHOST_USER_PROTOCOL_F_REPLY_ACK, Michael S. Tsirkin, 2020/02/25
- [PULL 14/32] virtio-iommu: Implement attach/detach command, Michael S. Tsirkin, 2020/02/25
- [PULL 26/32] docs: vhost-user: add in-band kick/call messages, Michael S. Tsirkin, 2020/02/25
- Re: [PULL 00/32] virtio, pc: fixes, features, Peter Maydell, 2020/02/25
- Re: [PULL 00/32] virtio, pc: fixes, features, no-reply, 2020/02/25