From d9460a7557672af9c4d9d4f153200d1075ed5a78 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 16 Oct 2015 13:33:07 +0200 Subject: [PATCH] virtio-input: ignore events until the guest driver is ready Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann --- hw/input/virtio-input.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/input/virtio-input.c b/hw/input/virtio-input.c index 7b25d27..1f5a40d 100644 --- a/hw/input/virtio-input.c +++ b/hw/input/virtio-input.c @@ -20,6 +20,10 @@ void virtio_input_send(VirtIOInput *vinput, virtio_input_event *event) unsigned have, need; int i, len; + if (!vinput->active) { + return; + } + /* queue up events ... */ if (vinput->qindex == vinput->qsize) { vinput->qsize++; -- 2.7.4