[gnome-boxes/use-usb3-when-supported: 2/2] vm-configurator: Use USB3 for supported OSes
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/use-usb3-when-supported: 2/2] vm-configurator: Use USB3 for supported OSes
- Date: Wed, 17 Feb 2021 10:44:03 +0000 (UTC)
commit 645f268e94eb4cd52618de66027c32c611b61cdb
Author: Felipe Borges <felipeborges gnome org>
Date: Tue Jul 14 14:59:20 2020 +0200
vm-configurator: Use USB3 for supported OSes
Fixes #258
Fixes #631
src/vm-configurator.vala | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
index f2a50bb8..924b0c9a 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -101,7 +101,7 @@ public static Domain create_domain_config (InstallerMedia install_media, string
var webdav_channel = create_webdav_channel ();
domain.add_device (webdav_channel);
- add_usb_support (domain);
+ add_usb_support (domain, install_media);
#if !FLATPAK
add_smartcard_support (domain);
#endif
@@ -650,7 +650,8 @@ public static void add_smartcard_support (Domain domain) {
domain.add_device (smartcard);
}
- public static void add_usb_support (Domain domain) {
+ public static void add_usb_support (Domain domain, InstallerMedia install_media) {
+
// 4 USB redirection channels
for (int i = 0; i < 4; i++) {
var usb_redir = new DomainRedirdev ();
@@ -660,6 +661,15 @@ public static void add_usb_support (Domain domain) {
domain.add_device (usb_redir);
}
+ var device = find_device_by_prop (install_media.supported_devices, DEVICE_PROP_NAME, "qemu-xhci");
+ if (device != null) {
+ var controller = create_usb_controller (DomainControllerUsbModel.QEMU_XHCI);
+ controller.set_ports (15); // 15 is the max amount qemu supports for a single controller
+ domain.add_device (controller);
+
+ return;
+ }
+
// USB controllers
var master_controller = create_usb_controller (DomainControllerUsbModel.ICH9_EHCI1);
domain.add_device (master_controller);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]