qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 1/1] virtio-input: ignore events until the guest driv


From: Gerd Hoffmann
Subject: [Qemu-devel] [PULL 1/1] virtio-input: ignore events until the guest driver is ready
Date: Tue, 20 Oct 2015 09:11:34 +0200

Cc: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
---
 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++;
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]