[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/6] vdpa: Fix index calculus at vhost_vdpa_svqs_start
From: |
Eugenio Pérez |
Subject: |
[PATCH 4/6] vdpa: Fix index calculus at vhost_vdpa_svqs_start |
Date: |
Thu, 12 May 2022 19:57:45 +0200 |
With the introduction of MQ the index of the vq needs to be calculated
with the device model vq_index.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
---
hw/virtio/vhost-vdpa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 493269b0b5..ed106bff47 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -1018,7 +1018,7 @@ static bool vhost_vdpa_svqs_start(struct vhost_dev *dev)
VirtQueue *vq = virtio_get_queue(dev->vdev, dev->vq_index + i);
VhostShadowVirtqueue *svq = g_ptr_array_index(v->shadow_vqs, i);
struct vhost_vring_addr addr = {
- .index = i,
+ .index = dev->vq_index + i,
};
int r;
bool ok = vhost_vdpa_svq_setup(dev, svq, i, &err);
--
2.27.0
- [PATCH 0/6] Shadow VirtQueue Fixes, Eugenio Pérez, 2022/05/12
- [PATCH 2/6] vhost: Fix device's used descriptor dequeue, Eugenio Pérez, 2022/05/12
- [PATCH 1/6] vhost: Track descriptor chain in private at SVQ, Eugenio Pérez, 2022/05/12
- [PATCH 3/6] vdpa: Fix bad index calculus at vhost_vdpa_get_vring_base, Eugenio Pérez, 2022/05/12
- [PATCH 4/6] vdpa: Fix index calculus at vhost_vdpa_svqs_start,
Eugenio Pérez <=
- [PATCH 5/6] hw/virtio: Replace g_memdup() by g_memdup2(), Eugenio Pérez, 2022/05/12
- [PATCH 6/6] vhost: Fix element in vhost_svq_add failure, Eugenio Pérez, 2022/05/12