thebeanogamer / rpms / qemu-kvm

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