diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2016-04-06 12:16:25 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-04-07 19:57:33 +0300 |
commit | 344dc16fae0cb6a011aa5befffc8e7d520b11d5d (patch) | |
tree | e32e2113e95926f9a08373f907a4cbd3221fbb66 /include/hw/virtio | |
parent | 43c696a298f6bef81818b1d8e64d41a160782101 (diff) | |
download | qemu-344dc16fae0cb6a011aa5befffc8e7d520b11d5d.zip |
virtio: add aio handler
In addition to handling IO in vcpu thread and in io thread, blk dataplane
introduces yet another mode: handling it by AioContext.
Currently, this reuses the same handler as previous modes,
which triggers races as these were not designed to be reentrant.
Add instead a separate handler just for aio; this will make
it possible to disable regular handlers when dataplane is active.
Signed-off-by: Michael S. Tsirkin <mst@redhat.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>
Diffstat (limited to 'include/hw/virtio')
-rw-r--r-- | include/hw/virtio/virtio.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 5afb51c94f..fa3f93b846 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -142,6 +142,9 @@ VirtQueue *virtio_add_queue(VirtIODevice *vdev, int queue_size, void (*handle_output)(VirtIODevice *, VirtQueue *)); +void virtio_set_queue_aio(VirtQueue *vq, + void (*handle_output)(VirtIODevice *, VirtQueue *)); + void virtio_del_queue(VirtIODevice *vdev, int n); void *virtqueue_alloc_element(size_t sz, unsigned out_num, unsigned in_num); |