]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtio: always use handle_aio_output if registered
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 28 Feb 2017 13:21:32 +0000 (14:21 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 28 Mar 2017 02:07:21 +0000 (21:07 -0500)
commitce37df91f4f9a4577fb12f46b94dde93c19bd661
treecf0a133b80e769c8b26918d7c7de6e805e76bbfe
parentdc35a13747843688690d5779ef22f2a62dfd6d3b
virtio: always use handle_aio_output if registered

Commit ad07cd6 ("virtio-scsi: always use dataplane path if ioeventfd is
active", 2016-10-30) and 9ffe337 ("virtio-blk: always use dataplane
path if ioeventfd is active", 2016-10-30) broke the virtio 1.0
indirect access registers.

The indirect access registers bypass the ioeventfd, so that virtio-blk
and virtio-scsi now repeatedly try to initialize dataplane instead of
triggering the guest->host EventNotifier.  Detect the situation by
checking vq->handle_aio_output; if it is not NULL, trigger the
EventNotifier, which is how the device expects to get notifications
and in fact the only thread-safe manner to deliver them.

Fixes: ad07cd6
Fixes: 9ffe337
Cc: qemu-stable@nongnu.org
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>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit e49a6618400d11e51e30328dfe8d7cafce82d4bc)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/virtio/virtio.c