Blame SOURCES/kvm-vhost-Move-vhost_svq_kick-call-to-vhost_svq_add.patch

586cba
From 3a944d8cd3d35b2398ff68d9ed8ea51d27dfab3c Mon Sep 17 00:00:00 2001
586cba
From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= <eperezma@redhat.com>
586cba
Date: Thu, 21 Jul 2022 15:38:55 +0200
586cba
Subject: [PATCH 12/32] vhost: Move vhost_svq_kick call to vhost_svq_add
586cba
MIME-Version: 1.0
586cba
Content-Type: text/plain; charset=UTF-8
586cba
Content-Transfer-Encoding: 8bit
586cba
586cba
RH-Author: Eugenio Pérez <eperezma@redhat.com>
586cba
RH-MergeRequest: 108: Net Control Virtqueue shadow Support
586cba
RH-Commit: [12/27] 29a7e1fb4992c4beca1e9a3379bb4c8a0f567459 (eperezmartin/qemu-kvm)
586cba
RH-Bugzilla: 1939363
586cba
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
586cba
RH-Acked-by: Cindy Lu <lulu@redhat.com>
586cba
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
586cba
586cba
Bugzilla: https://bugzilla.redhat.com/1939363
586cba
586cba
Upstream Status: git://git.qemu.org/qemu.git
586cba
586cba
commit 98b5adef8493a2bfad6655cfee84299e88bedbf7
586cba
Author: Eugenio Pérez <eperezma@redhat.com>
586cba
Date:   Wed Jul 20 08:59:31 2022 +0200
586cba
586cba
    vhost: Move vhost_svq_kick call to vhost_svq_add
586cba
586cba
    The series needs to expose vhost_svq_add with full functionality,
586cba
    including kick
586cba
586cba
    Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
586cba
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
586cba
    Signed-off-by: Jason Wang <jasowang@redhat.com>
586cba
586cba
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
586cba
---
586cba
 hw/virtio/vhost-shadow-virtqueue.c | 2 +-
586cba
 1 file changed, 1 insertion(+), 1 deletion(-)
586cba
586cba
diff --git a/hw/virtio/vhost-shadow-virtqueue.c b/hw/virtio/vhost-shadow-virtqueue.c
586cba
index 05cd39d1eb..e3fc3c2658 100644
586cba
--- a/hw/virtio/vhost-shadow-virtqueue.c
586cba
+++ b/hw/virtio/vhost-shadow-virtqueue.c
586cba
@@ -246,6 +246,7 @@ static bool vhost_svq_add(VhostShadowVirtqueue *svq, VirtQueueElement *elem)
586cba
     }
586cba
 
586cba
     svq->ring_id_maps[qemu_head] = elem;
586cba
+    vhost_svq_kick(svq);
586cba
     return true;
586cba
 }
586cba
 
586cba
@@ -306,7 +307,6 @@ static void vhost_handle_guest_kick(VhostShadowVirtqueue *svq)
586cba
                 /* VQ is broken, just return and ignore any other kicks */
586cba
                 return;
586cba
             }
586cba
-            vhost_svq_kick(svq);
586cba
         }
586cba
 
586cba
         virtio_queue_set_notification(svq->vq, true);
586cba
-- 
586cba
2.31.1
586cba