virtio-blk: always use dataplane path if ioeventfd is active
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 21 Oct 2016 20:48:09 +0000 (22:48 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 30 Oct 2016 17:51:32 +0000 (19:51 +0200)
commit9ffe337c08388d5c587eae1d77db1b0d1a47c7b1
treedc9a65b10c64d9633a2649e6beb730a65f93f536
parent8e93cef14e6f32adf6914b30b096039e6264f0e3
virtio-blk: always use dataplane path if ioeventfd is active

Override start_ioeventfd and stop_ioeventfd to start/stop the
whole dataplane logic.  This has some positive side effects:

- no need anymore for virtio_add_queue_aio (i.e. a revert of
  commit 0ff841f6d138904d514efa1d885bcaf54583852d)

- no need anymore to switch from generic ioeventfd handlers to
  dataplane

It detects some errors better:

    $ qemu-system-x86_64 -object iothread,id=io \
          -drive id=null,file=null-aio://,if=none,format=raw \
          -device virtio-blk-pci,ioeventfd=off,iothread=io,drive=null
    qemu-system-x86_64: -device virtio-blk-pci,ioeventfd=off,iothread=io,drive=null:
    ioeventfd is required for iothread

while previously it would have started just fine.

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/block/dataplane/virtio-blk.c
hw/block/dataplane/virtio-blk.h
hw/block/virtio-blk.c