virtio-scsi: use aio handler for data plane
commita8f2e5c8fffbaf7fbd4f0efc8efbeebade78008f
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 6 Apr 2016 10:16:27 +0000 (6 12:16 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 7 Apr 2016 16:57:33 +0000 (7 19:57 +0300)
tree6b9e0986c6d5e6b53ce4470c8b8cb07380127985
parent8a2fad57eb124ec0633f6f2b1c74c991fc7501bd
virtio-scsi: use aio handler for data plane

In addition to handling IO in vcpu thread and in io thread, dataplane
introduces yet another mode: handling it by AioContext.

This reuses the same handler as previous modes, which triggers races as
these were not designed to be reentrant.  Use a separate handler just
for aio, and disable regular handlers when dataplane is active.

Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/scsi/virtio-scsi-dataplane.c
hw/scsi/virtio-scsi.c
include/hw/virtio/virtio-scsi.h