Blame SOURCES/kvm-vdpa-Fix-index-calculus-at-vhost_vdpa_svqs_start.patch

29b115
From 6335431b70dd55c1d52152d726fa462db2e10eb8 Mon Sep 17 00:00:00 2001
29b115
From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= <eperezma@redhat.com>
29b115
Date: Thu, 12 May 2022 19:57:45 +0200
29b115
Subject: [PATCH 09/11] vdpa: Fix index calculus at vhost_vdpa_svqs_start
29b115
MIME-Version: 1.0
29b115
Content-Type: text/plain; charset=UTF-8
29b115
Content-Transfer-Encoding: 8bit
29b115
29b115
RH-Author: Eugenio Pérez <eperezma@redhat.com>
29b115
RH-MergeRequest: 114: vdpa: Fix memory listener deletions of iova tree
29b115
RH-Commit: [2/4] 9ce732e6bba426f8e00020ee6ad77f972f3e75b5 (eperezmartin/qemu-kvm)
29b115
RH-Bugzilla: 2116876
29b115
RH-Acked-by: Jason Wang <jasowang@redhat.com>
29b115
RH-Acked-by: Cindy Lu <lulu@redhat.com>
29b115
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
29b115
29b115
With the introduction of MQ the index of the vq needs to be calculated
29b115
with the device model vq_index.
29b115
29b115
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
29b115
Acked-by: Jason Wang <jasowang@redhat.com>
29b115
Message-Id: <20220512175747.142058-5-eperezma@redhat.com>
29b115
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
29b115
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
29b115
(cherry picked from commit 1c82fdfef8a227518ffecae9d419bcada995c202)
29b115
---
29b115
 hw/virtio/vhost-vdpa.c | 2 +-
29b115
 1 file changed, 1 insertion(+), 1 deletion(-)
29b115
29b115
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
29b115
index a7dfac530f..f877b354fa 100644
29b115
--- a/hw/virtio/vhost-vdpa.c
29b115
+++ b/hw/virtio/vhost-vdpa.c
29b115
@@ -1032,7 +1032,7 @@ static bool vhost_vdpa_svqs_start(struct vhost_dev *dev)
29b115
         VirtQueue *vq = virtio_get_queue(dev->vdev, dev->vq_index + i);
29b115
         VhostShadowVirtqueue *svq = g_ptr_array_index(v->shadow_vqs, i);
29b115
         struct vhost_vring_addr addr = {
29b115
-            .index = i,
29b115
+            .index = dev->vq_index + i,
29b115
         };
29b115
         int r;
29b115
         bool ok = vhost_vdpa_svq_setup(dev, svq, i, &err;;
29b115
-- 
29b115
2.31.1
29b115