[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 33/44] vhost-vdpa: prepare for the multiqueue support
From: |
Michael S. Tsirkin |
Subject: |
[PULL v2 33/44] vhost-vdpa: prepare for the multiqueue support |
Date: |
Wed, 20 Oct 2021 06:20:45 -0400 |
From: Jason Wang <jasowang@redhat.com>
Unlike vhost-kernel, vhost-vdpa adapts a single device multiqueue
model. So we need to simply use virtqueue index as the vhost virtqueue
index. This is a must for multiqueue to work for vhost-vdpa.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20211020045600.16082-4-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/virtio/vhost-vdpa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index ceb53613ba..8948fd316b 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -546,8 +546,8 @@ static int vhost_vdpa_get_vq_index(struct vhost_dev *dev,
int idx)
{
assert(idx >= dev->vq_index && idx < dev->vq_index + dev->nvqs);
- trace_vhost_vdpa_get_vq_index(dev, idx, idx - dev->vq_index);
- return idx - dev->vq_index;
+ trace_vhost_vdpa_get_vq_index(dev, idx, idx);
+ return idx;
}
static int vhost_vdpa_set_vring_ready(struct vhost_dev *dev)
--
MST
- [PULL v2 21/44] libvhost-user: fix VHOST_USER_REM_MEM_REG skipping mmap_addr, (continued)
- [PULL v2 21/44] libvhost-user: fix VHOST_USER_REM_MEM_REG skipping mmap_addr, Michael S. Tsirkin, 2021/10/20
- [PULL v2 18/44] vdpa: Check for iova range at mappings changes, Michael S. Tsirkin, 2021/10/20
- [PULL v2 24/44] docs: Add documentation for vhost based RNG implementation, Michael S. Tsirkin, 2021/10/20
- [PULL v2 26/44] failover: fix a regression introduced by JSON'ification of -device, Michael S. Tsirkin, 2021/10/20
- [PULL v2 27/44] vhost-user-blk-test: pass vhost-user socket fds to QSD, Michael S. Tsirkin, 2021/10/20
- [PULL v2 25/44] vhost-user: fix duplicated notifier MR init, Michael S. Tsirkin, 2021/10/20
- [PULL v2 22/44] vhost-user-rng: Add vhost-user-rng implementation, Michael S. Tsirkin, 2021/10/20
- [PULL v2 29/44] rebuild-expected-aml.sh: allow partial target list, Michael S. Tsirkin, 2021/10/20
- [PULL v2 30/44] bios-tables-test: don't disassemble empty files, Michael S. Tsirkin, 2021/10/20
- [PULL v2 28/44] qdev/qbus: remove failover specific code, Michael S. Tsirkin, 2021/10/20
- [PULL v2 33/44] vhost-vdpa: prepare for the multiqueue support,
Michael S. Tsirkin <=
- [PULL v2 32/44] vhost-vdpa: classify one time request, Michael S. Tsirkin, 2021/10/20
- [PULL v2 34/44] vhost-vdpa: let net_vhost_vdpa_init() returns NetClientState *, Michael S. Tsirkin, 2021/10/20
- [PULL v2 31/44] vhost-vdpa: open device fd in net_init_vhost_vdpa(), Michael S. Tsirkin, 2021/10/20
- [PULL v2 36/44] vhost-net: control virtqueue support, Michael S. Tsirkin, 2021/10/20
- [PULL v2 35/44] net: introduce control client, Michael S. Tsirkin, 2021/10/20
- [PULL v2 37/44] virtio-net: use "queue_pairs" instead of "queues" when possible, Michael S. Tsirkin, 2021/10/20
- [PULL v2 38/44] vhost: record the last virtqueue index for the virtio device, Michael S. Tsirkin, 2021/10/20
- [PULL v2 39/44] virtio-net: vhost control virtqueue support, Michael S. Tsirkin, 2021/10/20
- [PULL v2 40/44] vhost-vdpa: multiqueue support, Michael S. Tsirkin, 2021/10/20
- [PULL v2 42/44] tests/acpi/bios-tables-test: add and allow changes to a new q35 DSDT table blob, Michael S. Tsirkin, 2021/10/20