thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
ed5979
From 72f296870805750df8dfe5eaad77dd7d435a8f41 Mon Sep 17 00:00:00 2001
ed5979
From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= <eperezma@redhat.com>
ed5979
Date: Thu, 15 Dec 2022 12:31:40 +0100
ed5979
Subject: [PATCH 08/14] vdpa: allocate SVQ array unconditionally
ed5979
MIME-Version: 1.0
ed5979
Content-Type: text/plain; charset=UTF-8
ed5979
Content-Transfer-Encoding: 8bit
ed5979
ed5979
RH-Author: Eugenio Pérez <eperezma@redhat.com>
ed5979
RH-MergeRequest: 136: vDPA ASID support in Qemu
ed5979
RH-Bugzilla: 2104412
ed5979
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
ed5979
RH-Acked-by: Cindy Lu <lulu@redhat.com>
ed5979
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
ed5979
RH-Commit: [8/13] 08cd86d0859f82d768794e29241cfeff25df667c (eperezmartin/qemu-kvm)
ed5979
ed5979
SVQ may run or not in a device depending on runtime conditions (for
ed5979
example, if the device can move CVQ to its own group or not).
ed5979
ed5979
Allocate the SVQ array unconditionally at startup, since its hard to
ed5979
move this allocation elsewhere.
ed5979
ed5979
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
ed5979
Acked-by: Jason Wang <jasowang@redhat.com>
ed5979
Message-Id: <20221215113144.322011-9-eperezma@redhat.com>
ed5979
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
ed5979
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
ed5979
(cherry picked from commit 273e0003f0005cc17292dedae01e5edb0064b69c)
ed5979
---
ed5979
 hw/virtio/vhost-vdpa.c | 4 ----
ed5979
 1 file changed, 4 deletions(-)
ed5979
ed5979
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
ed5979
index 84218ce078..dd2768634b 100644
ed5979
--- a/hw/virtio/vhost-vdpa.c
ed5979
+++ b/hw/virtio/vhost-vdpa.c
ed5979
@@ -532,10 +532,6 @@ static void vhost_vdpa_svq_cleanup(struct vhost_dev *dev)
ed5979
     struct vhost_vdpa *v = dev->opaque;
ed5979
     size_t idx;
ed5979
 
ed5979
-    if (!v->shadow_vqs) {
ed5979
-        return;
ed5979
-    }
ed5979
-
ed5979
     for (idx = 0; idx < v->shadow_vqs->len; ++idx) {
ed5979
         vhost_svq_stop(g_ptr_array_index(v->shadow_vqs, idx));
ed5979
     }
ed5979
-- 
ed5979
2.31.1
ed5979