[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/57] vhost-vdpa: prepare for the multiqueue support
From: |
Michael S. Tsirkin |
Subject: |
[PULL 05/57] vhost-vdpa: prepare for the multiqueue support |
Date: |
Tue, 5 Oct 2021 12:00:58 -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: <20210907090322.1756-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 edac4017da..8587d30918 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -504,8 +504,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 00/57] pc,pci,virtio: features, fixes, Michael S. Tsirkin, 2021/10/05
- [PULL 04/57] vhost-vdpa: classify one time request, Michael S. Tsirkin, 2021/10/05
- [PULL 05/57] vhost-vdpa: prepare for the multiqueue support,
Michael S. Tsirkin <=
- [PULL 03/57] vhost-vdpa: open device fd in net_init_vhost_vdpa(), Michael S. Tsirkin, 2021/10/05
- [PULL 02/57] hw/virtio: Have virtqueue_get_avail_bytes() pass caches arg to callees, Michael S. Tsirkin, 2021/10/05
- [PULL 07/57] net: introduce control client, Michael S. Tsirkin, 2021/10/05
- [PULL 08/57] vhost-net: control virtqueue support, Michael S. Tsirkin, 2021/10/05
- [PULL 12/57] vhost-vdpa: multiqueue support, Michael S. Tsirkin, 2021/10/05
- [PULL 11/57] virtio-net: vhost control virtqueue support, Michael S. Tsirkin, 2021/10/05
- [PULL 09/57] virtio-net: use "queue_pairs" instead of "queues" when possible, Michael S. Tsirkin, 2021/10/05
- [PULL 10/57] vhost: record the last virtqueue index for the virtio device, Michael S. Tsirkin, 2021/10/05
- [PULL 14/57] vhost-vsock: handle common features in vhost-vsock-common, Michael S. Tsirkin, 2021/10/05
- [PULL 16/57] acpi: build_rsdt: use acpi_table_begin()/acpi_table_end() instead of build_header(), Michael S. Tsirkin, 2021/10/05