]> git.proxmox.com Git - mirror_qemu.git/commitdiff
virtio-scsi: prepare virtio_scsi_handle_cmd for dataplane
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 7 Dec 2021 13:23:34 +0000 (13:23 +0000)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 12 Jan 2022 17:09:39 +0000 (17:09 +0000)
Prepare virtio_scsi_handle_cmd() to be used by both dataplane and
non-dataplane by making the condition for starting ioeventfd more
specific. This way it won't trigger when dataplane has already been
started.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-id: 20211207132336.36627-5-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/scsi/virtio-scsi.c

index 51fd09522ac687cbb8a32bf1c6ecf4d9c2ba25ab..34a968ecfb5b45d5b2f09aef052197aceab4728e 100644 (file)
@@ -720,7 +720,7 @@ static void virtio_scsi_handle_cmd(VirtIODevice *vdev, VirtQueue *vq)
     /* use non-QOM casts in the data path */
     VirtIOSCSI *s = (VirtIOSCSI *)vdev;
 
-    if (s->ctx) {
+    if (s->ctx && !s->dataplane_started) {
         virtio_device_start_ioeventfd(vdev);
         if (!s->dataplane_fenced) {
             return;