summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-10-20 12:56:45 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-10-20 12:56:45 +0100
commitee9dfed242610ecb91418270fd46b875ed56e201 (patch)
tree291100c293046cab1b52d19e99253480518ab3cb /hw
parentb38c0494c141e2d7dabb3ecbf380305b74f9e330 (diff)
parentd9460a7557672af9c4d9d4f153200d1075ed5a78 (diff)
downloadqemu-ee9dfed242610ecb91418270fd46b875ed56e201.zip
Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-20151020-1' into staging
virtio-input: ignore events until the guest driver is ready # gpg: Signature made Tue 20 Oct 2015 08:10:00 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-input-20151020-1: virtio-input: ignore events until the guest driver is ready Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/input/virtio-input.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/input/virtio-input.c b/hw/input/virtio-input.c
index 7b25d27693..1f5a40de35 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++;