aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2021-10-20 12:55:53 +0800
committerMichael S. Tsirkin <mst@redhat.com>2021-10-20 04:44:05 -0400
commit353244d8b96767659e6c95c0c87dfe4372fe8c12 (patch)
tree5257e67195d27bfdcf6b316de780360842dfb065 /hw/virtio
parent4d191cfdc7de958d06f821173f721c56bc131620 (diff)
downloadqemu-353244d8b96767659e6c95c0c87dfe4372fe8c12.zip
qemu-353244d8b96767659e6c95c0c87dfe4372fe8c12.tar.gz
qemu-353244d8b96767659e6c95c0c87dfe4372fe8c12.tar.bz2
vhost-vdpa: prepare for the multiqueue support
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>
Diffstat (limited to 'hw/virtio')
-rw-r--r--hw/virtio/vhost-vdpa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index ceb5361..8948fd3 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)