summaryrefslogtreecommitdiff
path: root/extras/qemu/42-qemu-usb.rules
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2011-01-25 15:51:07 +0100
committerKay Sievers <kay.sievers@vrfy.org>2011-01-25 16:14:04 +0100
commit4e54f5334e130dc8f627c96ef2179ff4262b7791 (patch)
tree64fdde91c48b465c8c4ab2fbb9481fb4269a50b1 /extras/qemu/42-qemu-usb.rules
parent2514465f6a4ab61617482f068e475b945438c1f1 (diff)
extras: add rules for qemu guests
These patches enable usb autosuspend for the qemu emulated HID devices. This reduces the cpu load for idle guests with a hid device attached because the linux kernel will suspend the usb bus then and qemu can stop running a 1000 Hz to emulate the (active) UHCI controller. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'extras/qemu/42-qemu-usb.rules')
-rw-r--r--extras/qemu/42-qemu-usb.rules13
1 files changed, 13 insertions, 0 deletions
diff --git a/extras/qemu/42-qemu-usb.rules b/extras/qemu/42-qemu-usb.rules
new file mode 100644
index 0000000000..4fd53c7477
--- /dev/null
+++ b/extras/qemu/42-qemu-usb.rules
@@ -0,0 +1,13 @@
+#
+# Enable autosuspend for qemu emulated usb hid devices.
+#
+# Note that there are buggy qemu versions which advertise remote
+# wakeup support but don't actually implement it correctly. This
+# is the reason why we need a match for the serial number here.
+# The serial number "42" is used to tag the implementations where
+# remote wakeup is working.
+#
+
+ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Mouse", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto"
+ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Tablet", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto"
+CTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Keyboard", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto"