diff options
| author | Stefan Hajnoczi | 2021-12-07 14:23:34 +0100 |
|---|---|---|
| committer | Stefan Hajnoczi | 2022-01-12 18:09:39 +0100 |
| commit | f34e8d8b8d48d73f36a67b6d5e492ef9784b5012 (patch) | |
| tree | f2309bcfe5e8c0fe49a3fc672ad02e8f0796bd6c | |
| parent | virtio-blk: drop unused virtio_blk_handle_vq() return value (diff) | |
| download | qemu-f34e8d8b8d48d73f36a67b6d5e492ef9784b5012.tar.gz qemu-f34e8d8b8d48d73f36a67b6d5e492ef9784b5012.tar.xz qemu-f34e8d8b8d48d73f36a67b6d5e492ef9784b5012.zip | |
virtio-scsi: prepare virtio_scsi_handle_cmd for dataplane
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>
| -rw-r--r-- | hw/scsi/virtio-scsi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 51fd09522a..34a968ecfb 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -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; |
