mirror of
https://github.com/qemu/qemu.git
synced 2025-01-19 03:53:28 +08:00
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>
This commit is contained in:
parent
186b969173
commit
f34e8d8b8d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user