[pve-devel] [PATCH qemu-server 1/2] Add USB3 support to Spice USB redirection
Aaron Lauterer
a.lauterer at proxmox.com
Fri Aug 30 09:40:09 CEST 2019
Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
PVE/QemuServer/USB.pm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm
index a2097b9..05c78cf 100644
--- a/PVE/QemuServer/USB.pm
+++ b/PVE/QemuServer/USB.pm
@@ -87,9 +87,12 @@ sub get_usb_devices {
my $hostdevice = parse_usb_device($d->{host});
$hostdevice->{usb3} = $d->{usb3};
if (defined($hostdevice->{spice}) && $hostdevice->{spice}) {
- # usb redir support for spice, currently no usb3
+ # usb redir support for spice
+ my $bus = 'ehci';
+ $bus = 'xhci' if $hostdevice->{usb3};
+
push @$devices, '-chardev', "spicevmc,id=usbredirchardev$i,name=usbredir";
- push @$devices, '-device', "usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=ehci.0";
+ push @$devices, '-device', "usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=$bus.0";
} else {
push @$devices, '-device', print_usbdevice_full($conf, "usb$i", $hostdevice);
}
--
2.20.1
More information about the pve-devel
mailing list