[pve-devel] [PATCH qemu-server] enable usb3 for spice redirection

Alexandre DERUMIER aderumier at odiso.com
Tue Aug 30 16:29:02 CEST 2016


Hi,

Does live migration still work with this change ? (old qemu process with usb2 -> to new qemu process with usb3)



----- Mail original -----
De: "Dominik Csapak" <d.csapak at proxmox.com>
À: "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Mardi 30 Août 2016 14:56:58
Objet: [pve-devel] [PATCH qemu-server] enable usb3 for spice redirection

since it seems to work now, we can enable spice redirection 
using usb3 

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com> 
--- 
tested with usb3 and usb2 devices, works here 
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 599641e..7f008b2 100644 
--- a/PVE/QemuServer/USB.pm 
+++ b/PVE/QemuServer/USB.pm 
@@ -88,9 +88,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 
+ my $bus = 'ehci.0'; 
+ if ($hostdevice->{usb3}) { 
+ $bus = 'xhci.0'; 
+ } 
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"; 
} else { 
push @$devices, '-device', print_usbdevice_full($conf, "usb$i", $hostdevice); 
} 
-- 
2.1.4 


_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 




More information about the pve-devel mailing list