qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 40/40] virtio-input: ignore events until the guest d


From: Michael Roth
Subject: [Qemu-devel] [PATCH 40/40] virtio-input: ignore events until the guest driver is ready
Date: Wed, 21 Oct 2015 12:52:10 -0500

From: Gerd Hoffmann <address@hidden>

Cc: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
(cherry picked from commit d9460a7557672af9c4d9d4f153200d1075ed5a78)
Signed-off-by: Michael Roth <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.9.1




reply via email to

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