Bug 895491

Summary: PATCH: 0110-usb-redir-Add-flow-control-support.patch has been mangled on rebase !!
Product: Red Hat Enterprise Linux 7 Reporter: Hans de Goede <hdegoede>
Component: qemu-kvmAssignee: Miroslav Rezanina <mrezanin>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: acathrow, areis, flang, hhuang, huding, juzhang, michen, qzhang, sluo, virt-maint
Target Milestone: rcKeywords: Rebase
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-1.3.0-5.el7 Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:16:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
0110-usb-redir-Add-flow-control-support.patch none

Description Hans de Goede 2013-01-15 10:42:08 UTC
Created attachment 678708 [details]
0110-usb-redir-Add-flow-control-support.patch

PATCH: 0110-usb-redir-Add-flow-control-support.patch has been mangled on rebase !

Line 35 of the patch file now reads:
+    r - qemu_chr_fe_write(dev->cs, data, count);
But this should be:
+    r = qemu_chr_fe_write(dev->cs, data, count);

This causes usbredir to not work, see ie bug 895373.

I'll attach an updated version of the patch fixing this.

Comment 1 Hans de Goede 2013-01-15 10:43:56 UTC
*** Bug 895373 has been marked as a duplicate of this bug. ***

Comment 3 Hans de Goede 2013-01-19 08:48:35 UTC
No idea why this got assigned to me (note please talk to people before assigning stuff to them), but since this is a mangled patch, not adding a new patch, it falls outside of our regular patch process and thus needs to be handled by one of the qemu-maintainers.

Comment 5 langfang 2013-02-20 03:45:21 UTC
Just test this bug :

Use the newest fixed version:
HOST
qemu-kvm-1.3.0-5.el7
# uname -r
3.7.0-0.32.el7.x86_64

Guest:rhel7

Results:
1. virtio-scsi Driver QEMU QEMU HARDDISK 1.3. 
2. USB MSC Drive Kingston DT 101 G2 PMAP
3. Legacy option rom
4.iPXE (PCI 00:04.0)


It can pass-through the physical USB stick redirected from usb-host to usb-guest using remote-viewer


Addtinoal info:
1)Pass-through the physical USB stick redirected from usb-host to usb-guest using remote-viewer when use the remote-viewer of rhel6.4 to connect VM--->sucessfully
2)Pass-through the physical USB stick redirected from usb-host to usb-guest using remote-viewer when use the remote-viewer of rhel7 to connect VM--->sucessfully

CLI:
 /usr/libexec/qemu-kvm -S -M pc-1.3 -enable-kvm -m 1024 -smp 2,sockets=2,cores=1,threads=1 -uuid `uuidgen` -no-user-config -nodefaults -rtc base=utc  -device usb-ehci,id=ehci -drive file=/home/RHEL-Server-7.0-64-virtio.qcow2,if=none,id=drive-virtio-0-0,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi,bus=pci.0,addr=0x8 -device scsi-hd,drive=drive-virtio-0-0,id=drive-scsi -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,id=net0,mac=52:54:00:60:3f:29,bus=pci.0 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0   -vga std  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x6 -chardev socket,id=channel0,path=/tmp/tty0,server,nowait -device virtserialport,chardev=channel0,name=org.linux-kvm.port.1,bus=virtio-serial0.0,id=port1 -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device  virtio-serial -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 -monitor stdio   -boot menu=on,order=c -spice port=5800,disable-ticketing -vga std -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0,debug=3

Comment 7 huiqingding 2014-01-24 09:42:38 UTC
Verify this bug using the following version:
qemu-kvm-1.5.3-41.el7.x86_64
kernel-3.10.0-67.el7.x86_64

Steps of verification:
1. plugin a physical USB stick to the host which running remote-viewer
2. boot a guest
# /usr/libexec/qemu-kvm -S -M pc -enable-kvm -m 1024 -smp 2,sockets=2,cores=1,threads=1 -uuid `uuidgen` -no-user-config -nodefaults -rtc base=utc  -device usb-ehci,id=ehci -drive file=/home/RHEL-Server-7.0-64-virtio.qcow2,if=none,id=drive-virtio-0-0,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi,bus=pci.0,addr=0x8 -device scsi-hd,drive=drive-virtio-0-0,id=drive-scsi -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,id=net0,mac=52:54:00:60:3f:29,bus=pci.0 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0   -vga std  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x6 -chardev socket,id=channel0,path=/tmp/tty0,server,nowait -device virtserialport,chardev=channel0,name=org.linux-kvm.port.1,bus=virtio-serial0.0,id=port1 -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device  virtio-serial -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 -monitor stdio   -boot menu=on,order=c -spice port=5800,disable-ticketing -vga std -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0,debug=3
3. run remote-viewer to connect guest and press F12 
4. in guest, create a file on the passthru USB stick
# mount /dev/sdb /mnt
# cd /mnt
# dd if=/dev/random of=/mnt/file count=200 bs=1M

Actual results:
1. after step3, you can see:
     1. virtio-scsi Driver QEMU QEMU HARDDISK 1.3. 
     2. USB MSC Drive Kingston DT 101 G2 PMAP
     3. Legacy option rom
     4.iPXE (PCI 00:04.0)
2. after step4, the file can be created successfully.

Based on the above results, I think this bug has been fixed.

Comment 9 Ludek Smid 2014-06-13 11:16:39 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.