Update to rc4 of v2.9.0. Also includes a few other fixes, and a number of tweaks to the spec files. I'd be happy to answer any questions about all those spec file changes, I believe they were all in the direction of a more correct and maintainable spec file. Since this is still in rc phase, let's keep it in devel project. Final release should appear in time for Beta2 of SLE12SP3. Delta from previous: Added Alex's patch for keyboard empty event. OBS-URL: https://build.opensuse.org/request/show/487699 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=334
49 lines
1.7 KiB
Diff
49 lines
1.7 KiB
Diff
From 1337d5da71ac778f2eff10554d2de12c95d5e30e Mon Sep 17 00:00:00 2001
|
|
From: Alexander Graf <agraf@suse.de>
|
|
Date: Thu, 30 Mar 2017 15:32:08 +0200
|
|
Subject: [PATCH] input: Add trace event for empty keyboard queue
|
|
|
|
When driving QEMU from the outside, we have basically no chance to
|
|
determine how quickly the guest OS picks up key events, so we usually
|
|
have to limit ourselves to very slow keyboard presses to make sure
|
|
the guest always has enough chance to pick them up.
|
|
|
|
This patch adds a trace events when the keyboarde queue is drained.
|
|
An external driver can use that as hint that new keys can be pressed.
|
|
|
|
Signed-off-by: Alexander Graf <agraf@suse.de>
|
|
[BR: BSC#1031692]
|
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
|
---
|
|
hw/input/hid.c | 4 ++++
|
|
hw/input/trace-events | 1 +
|
|
2 files changed, 5 insertions(+)
|
|
|
|
diff --git a/hw/input/hid.c b/hw/input/hid.c
|
|
index fa9cc4c616..93887ecc43 100644
|
|
--- a/hw/input/hid.c
|
|
+++ b/hw/input/hid.c
|
|
@@ -256,6 +256,10 @@ static void hid_keyboard_process_keycode(HIDState *hs)
|
|
slot = hs->head & QUEUE_MASK; QUEUE_INCR(hs->head); hs->n--;
|
|
keycode = hs->kbd.keycodes[slot];
|
|
|
|
+ if (!hs->n) {
|
|
+ trace_hid_kbd_queue_empty();
|
|
+ }
|
|
+
|
|
key = keycode & 0x7f;
|
|
index = key | ((hs->kbd.modifiers & (1 << 8)) >> 1);
|
|
hid_code = hid_usage_keys[index];
|
|
diff --git a/hw/input/trace-events b/hw/input/trace-events
|
|
index f3bfbede5c..5a87818b49 100644
|
|
--- a/hw/input/trace-events
|
|
+++ b/hw/input/trace-events
|
|
@@ -24,6 +24,7 @@ milkymist_softusb_pulse_irq(void) "Pulse IRQ"
|
|
|
|
# hw/input/hid.c
|
|
hid_kbd_queue_full(void) "queue full"
|
|
+hid_kbd_queue_empty(void) "queue empty"
|
|
|
|
# hw/input/virtio
|
|
virtio_input_queue_full(void) "queue full"
|