[virt-manager PATCH 5/6] osdict: Add supports_virtioinput()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 virtinst/osdict.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index 20ce03ee..4ffcfa29 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -427,6 +427,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";]
-- 
2.20.1

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux