qemu/include/hw/virtio
Ladi Prosek 57094547df virtio-input: fix eventq batching
virtio_input_send buffers input events until it sees a SYNC. Then it
either sends or drops the entire batch, depending on whether eventq
has enough space available. The case to avoid here is partial sends
where only part of the batch would get to the guest.

Using virtqueue_get_avail_bytes to check the state of eventq was not
correct. The queue may have a smaller number of larger buffers
available so bytes may be enough but the batch would still not be
possible to send, leading to the "Huh?  No vq elem available" error.

Instead of checking available bytes, this patch optimistically pops
buffers from the queue and puts them back in case it runs out of
space and the batch needs to be dropped.

Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Message-id: 1490365490-4854-3-git-send-email-lprosek@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-03-27 12:14:45 +02:00
..
vhost-backend.h
vhost-scsi.h
vhost-vsock.h
vhost.h
virtio-access.h
virtio-balloon.h
virtio-blk.h
virtio-bus.h
virtio-crypto.h
virtio-gpu.h
virtio-input.h virtio-input: fix eventq batching 2017-03-27 12:14:45 +02:00
virtio-net.h
virtio-rng.h
virtio-scsi.h
virtio-serial.h
virtio.h