guest: Enable USB input devices for RISC-V virt guests

If USB support is available, we can use USB input devices too.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Andrea Bolognani 2019-04-04 12:49:50 +02:00 committed by Cole Robinson
parent 9bec57723e
commit 20c212cdfc
2 changed files with 5 additions and 1 deletions

View File

@ -32,6 +32,8 @@
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
<input type="tablet" bus="usb"/>
<input type="keyboard" bus="usb"/>
<graphics type="vnc" port="-1"/>
<video>
<model type="virtio"/>

View File

@ -719,7 +719,9 @@ class Guest(XMLBuilder):
usb_keyboard = False
if self.os.is_x86() and not self.os.is_xenpv():
usb_tablet = self.osinfo.supports_usbtablet()
if self.os.is_arm_machvirt() or self.os.is_pseries():
if (self.os.is_arm_machvirt() or
self.os.is_riscv_virt() or
self.os.is_pseries()):
usb_tablet = True
usb_keyboard = True