28 lines
1.0 KiB
Diff
28 lines
1.0 KiB
Diff
|
Subject: osdict: Add supports_virtioinput()
|
||
|
From: Andrea Bolognani abologna@redhat.com Wed Mar 20 16:52:34 2019 +0100
|
||
|
Date: Thu Mar 21 15:31:20 2019 +0100:
|
||
|
Git: 708af01c145dcaf5146901d18e22d1da61e09444
|
||
|
|
||
|
We can use this function to figure out whether the guest OS
|
||
|
supports VirtIO input devices (virtio-tablet, virtio-keyboard
|
||
|
and virtio-mouse).
|
||
|
|
||
|
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||
|
|
||
|
Index: virt-manager-2.1.0/virtinst/osdict.py
|
||
|
===================================================================
|
||
|
--- virt-manager-2.1.0.orig/virtinst/osdict.py
|
||
|
+++ virt-manager-2.1.0/virtinst/osdict.py
|
||
|
@@ -390,6 +390,11 @@ class _OsVariant(object):
|
||
|
# Remove this hack after 6 months or so
|
||
|
return self._is_related_to("rhel6.0")
|
||
|
|
||
|
+ def supports_virtioinput(self):
|
||
|
+ # virtio1.0-input
|
||
|
+ devids = ["http://pcisig.com/pci/1af4/1052"]
|
||
|
+ return bool(self._device_filter(devids=devids))
|
||
|
+
|
||
|
def supports_usb3(self):
|
||
|
# qemu-xhci
|
||
|
devids = ["http://pcisig.com/pci/1b36/0004"]
|