Unverified Commit 0136bae4 authored by Frédéric Pierret (fepitre)'s avatar Frédéric Pierret (fepitre)
Browse files

Fix filtering of QEMU tablet from sys-usb to dom0

In 4.0 HVM is not exposing previous filtering characteristics and
there is no particular differences between HVM qemu-emulated tablet and
the one provided by KVM when hosting Qubes into (e.g. openQA). We filter
on pci bus and serial info.

Fixes QubesOS/qubes-issues#6160
parent c4c407ba
Pipeline #456 failed with stage
in 120 minutes and 59 seconds
......@@ -35,9 +35,12 @@ def get_args():
def get_service_name(udevreturn, input_dev):
service = None
if (('ID_INPUT_TABLET' in udevreturn) or (
'ID_INPUT_TOUCHSCREEN' in udevreturn) or (
'ID_INPUT_TOUCHPAD' in udevreturn)) and 'ID_INPUT_KEY' not in udevreturn:
if (
('ID_INPUT_TABLET' in udevreturn) or
('ID_INPUT_TOUCHSCREEN' in udevreturn) or
('ID_INPUT_TOUCHPAD' in udevreturn) or
('QEMU_USB_Tablet' in udevreturn)
) and 'ID_INPUT_KEY' not in udevreturn:
service = 'qubes-input-sender-tablet'
elif 'ID_INPUT_MOUSE' in udevreturn and 'ID_INPUT_KEY' not in udevreturn:
service = 'qubes-input-sender-mouse'
......@@ -91,6 +94,13 @@ def handle_event(input_dev, action, dom0):
if 'ID_SERIAL_SHORT=28754-0000:00:05.0-1' in udevreturn or \
'ID_TYPE=video' in udevreturn:
return
# In 4.0 HVM is not exposing above characteristics and there is
# no particular differences between HVM qemu-emulated tablet and
# the one provided by KVM when hosting Qubes into (e.g. openQA).
# We filter on pci bus and serial info
if 'ID_PATH=pci-0000:00:04.0-usb-0:1:1.0' in udevreturn and \
'ID_SERIAL=QEMU_QEMU_USB_Tablet_42' in udevreturn:
return
if '/devices/virtual/' in udevreturn and dom0:
return
# We exclude in sys-usb ID_PATH=acpi-* and ID_PATH=platform-*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment