qemu/hw/input
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
..
Makefile.objs virtio-input: Fix device introspection on non-Linux hosts 2015-10-09 15:25:56 +02:00
adb.c adb: change handler only when recognized 2016-10-28 09:38:26 +11:00
hid.c hw/input/hid: support alternative sysrq/break scancodes for gtk-vnc 2016-11-10 15:29:58 +00:00
lm832x.c i2c: Allow I2C devices to NAK start events 2017-01-09 11:40:20 +00:00
milkymist-softusb.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
pckbd.c pc: simplify passing qemu_irq 2016-09-08 18:05:21 +04:00
pl050.c hw: explicitly include qemu/log.h 2016-05-19 16:42:29 +02:00
ps2.c ps2: add support for mice with extra/side buttons 2017-01-31 08:14:51 +01:00
pxa2xx_keypad.c arm: Clean up includes 2016-01-29 15:07:23 +00:00
stellaris_input.c arm: Clean up includes 2016-01-29 15:07:23 +00:00
trace-events trace: clean up trace-events files 2017-01-31 17:12:15 +00:00
tsc210x.c vmstateify tsc210x 2016-10-04 13:28:08 +01:00
tsc2005.c vmstateify tsc2005 2016-10-04 13:28:08 +01:00
virtio-input-hid.c virtio-input: fix emulated tablet axis ranges 2016-04-13 15:52:28 +02:00
virtio-input-host.c virtio-input: support absolute axis config in pass-through 2016-04-13 17:26:12 +02:00
virtio-input.c virtio-input: fix eventq batching 2017-03-27 12:14:45 +02:00
vmmouse.c hw: Clean up includes 2016-01-29 15:07:25 +00:00