qemu-patch-raspberry4/include/hw/virtio
Paolo Bonzini 2906cddfec virtio-blk: fix "disabled data plane" mode
In disabled mode, virtio-blk dataplane seems to be enabled, but flow
actually goes through the normal virtio path.  This patch simplifies a bit
the handling of disabled mode.  In disabled mode, virtio_blk_handle_output
might be called even if s->dataplane is not NULL.

This is a bit tricky, because the current check for s->dataplane will
always trigger, causing a continuous stream of calls to
virtio_blk_data_plane_start.  Unfortunately, these calls will not
do anything.  To fix this, set the "started" flag even in disabled
mode, and skip virtio_blk_data_plane_start if the started flag is true.
The resulting changes also prepare the code for the next patch, were
virtio-blk dataplane will reuse the same virtio_blk_handle_output function
as "regular" virtio-blk.

Because struct VirtIOBlockDataPlane is opaque in virtio-blk.c, we have
to move s->dataplane->started inside struct VirtIOBlock.

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: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
2016-02-25 13:14:18 +02:00
..
dataplane vring: make vring_enable_notification return void 2016-02-25 13:14:18 +02:00
vhost-backend.h vhost-user: don't merge regions with different fds 2016-02-23 12:55:16 +02:00
vhost-scsi.h vhost-scsi: include linux/vhost.h 2015-09-25 12:04:41 +02:00
vhost.h vhost: drop dead code 2015-12-02 17:59:13 +02:00
virtio-access.h virtio: optimize virtio_access_is_big_endian() for little-endian targets 2016-02-16 12:05:18 +02:00
virtio-balloon.h virtio: move allocation to virtqueue_pop/vring_pop 2016-02-06 20:39:07 +02:00
virtio-blk.h virtio-blk: fix "disabled data plane" mode 2016-02-25 13:14:18 +02:00
virtio-bus.h virtio: handle non-virtio-1-capable backend for ccw 2015-12-02 19:34:11 +02:00
virtio-gpu.h virtio-gpu: block any rendering until client (ui) is done 2016-02-03 10:41:36 +01:00
virtio-input.h virtio-input: add input routing support 2015-07-03 12:21:11 +02:00
virtio-net.h virtio-net: use the backend cross-endian capabilities 2016-02-16 12:05:17 +02:00
virtio-rng.h virtio-rng: trigger timer only when guest requests for entropy 2015-07-17 19:05:16 +05:30
virtio-scsi.h virtio: move allocation to virtqueue_pop/vring_pop 2016-02-06 20:39:07 +02:00
virtio-serial.h virtio: move allocation to virtqueue_pop/vring_pop 2016-02-06 20:39:07 +02:00
virtio.h virtio: export vring_notify as virtio_should_notify 2016-02-25 13:14:18 +02:00