virtio-scsi: always use dataplane path if ioeventfd is active
commitad07cd69ecaffbaa015459a46975ab32e50df805
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 21 Oct 2016 20:48:10 +0000 (21 22:48 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 30 Oct 2016 17:51:32 +0000 (30 19:51 +0200)
treedb5a7cc223cc1cfedd98c5decb96a9ca1a1985da
parent9ffe337c08388d5c587eae1d77db1b0d1a47c7b1
virtio-scsi: 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 1c627137c10ee2dcf59e0383ade8a9abfa2d4355)

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

It detects some errors better:

    $ qemu-system-x86_64 -object iothread,id=io \
          -device virtio-scsi-pci,ioeventfd=off,iothread=io
    qemu-system-x86_64: -device virtio-scsi-pci,ioeventfd=off,iothread=io:
    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/scsi/virtio-scsi-dataplane.c
hw/scsi/virtio-scsi.c
include/hw/virtio/virtio-scsi.h