thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-virtio-scsi-clean-up-virtio_scsi_handle_event_vq.patch

29b115
From 019d5a0ca5d13f837a59b9e2815e2fd7ac120807 Mon Sep 17 00:00:00 2001
29b115
From: Stefan Hajnoczi <stefanha@redhat.com>
29b115
Date: Tue, 17 May 2022 09:28:06 +0100
29b115
Subject: [PATCH 11/16] virtio-scsi: clean up virtio_scsi_handle_event_vq()
29b115
29b115
RH-Author: Stefan Hajnoczi <stefanha@redhat.com>
29b115
RH-MergeRequest: 88: virtio-scsi: fix 100% CPU consumption with IOThreads
29b115
RH-Commit: [3/6] f8dbc4c1991c61e4cf8dea50942c3cd509c9c4bd (stefanha/centos-stream-qemu-kvm)
29b115
RH-Bugzilla: 2079347
29b115
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
29b115
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
29b115
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
29b115
29b115
virtio_scsi_handle_event_vq() is only called from hw/scsi/virtio-scsi.c
29b115
now and its return value is no longer used. Remove the function
29b115
prototype from virtio-scsi.h and drop the return value.
29b115
29b115
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
29b115
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
29b115
Message-id: 20220427143541.119567-4-stefanha@redhat.com
29b115
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
29b115
(cherry picked from commit 37ce2de95169dacab3fb53d11bd4509b9c2e3a4c)
29b115
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
29b115
---
29b115
 hw/scsi/virtio-scsi.c           | 4 +---
29b115
 include/hw/virtio/virtio-scsi.h | 1 -
29b115
 2 files changed, 1 insertion(+), 4 deletions(-)
29b115
29b115
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
29b115
index 7b69eeed64..dd2185b943 100644
29b115
--- a/hw/scsi/virtio-scsi.c
29b115
+++ b/hw/scsi/virtio-scsi.c
29b115
@@ -856,13 +856,11 @@ void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev,
29b115
     virtio_scsi_complete_req(req);
29b115
 }
29b115
 
29b115
-bool virtio_scsi_handle_event_vq(VirtIOSCSI *s, VirtQueue *vq)
29b115
+static void virtio_scsi_handle_event_vq(VirtIOSCSI *s, VirtQueue *vq)
29b115
 {
29b115
     if (s->events_dropped) {
29b115
         virtio_scsi_push_event(s, NULL, VIRTIO_SCSI_T_NO_EVENT, 0);
29b115
-        return true;
29b115
     }
29b115
-    return false;
29b115
 }
29b115
 
29b115
 static void virtio_scsi_handle_event(VirtIODevice *vdev, VirtQueue *vq)
29b115
diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h
29b115
index 543681bc18..5957597825 100644
29b115
--- a/include/hw/virtio/virtio-scsi.h
29b115
+++ b/include/hw/virtio/virtio-scsi.h
29b115
@@ -151,7 +151,6 @@ void virtio_scsi_common_realize(DeviceState *dev,
29b115
                                 Error **errp);
29b115
 
29b115
 void virtio_scsi_common_unrealize(DeviceState *dev);
29b115
-bool virtio_scsi_handle_event_vq(VirtIOSCSI *s, VirtQueue *vq);
29b115
 bool virtio_scsi_handle_cmd_vq(VirtIOSCSI *s, VirtQueue *vq);
29b115
 bool virtio_scsi_handle_ctrl_vq(VirtIOSCSI *s, VirtQueue *vq);
29b115
 void virtio_scsi_init_req(VirtIOSCSI *s, VirtQueue *vq, VirtIOSCSIReq *req);
29b115
-- 
29b115
2.31.1
29b115