Bug 1163046

Summary: qemu-kvm should quit when usb-host hit speed mismatch
Product: Red Hat Enterprise Linux 7 Reporter: Jun Li <juli>
Component: qemu-kvm-rhevAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 7.0CC: hhuang, juzhang, knoel, michen, qzhang, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1163048 1217326 (view as bug list) Environment:
Last Closed: 2016-06-13 12:53:49 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:
Bug Depends On:    
Bug Blocks: 1163048, 1217326    

Description Jun Li 2014-11-12 10:03:38 UTC
Description of problem:
When boot qemu-kvm with usb-host hit a speed mismatch, qemu-kvm should quit.

Currently, it will just give some warning in HMP, can not capture any warning via QMP.

BTW, also test with virt-manager, it will hit this issue, too. So mark this bz as high Severity.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.1.2-6.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with a usb-host device. cli as followings:
# /usr/libexec/qemu-kvm -monitor stdio -device ich9-usb-ehci1,id=ehci0 -device usb-host,hostbus=1,hostaddr=12,id=usb-kbd,bus=ehci0.0 -qmp tcp::8888,server,nowait
2.
3.

Actual results:
Just give some warning:
qemu-kvm: Warning: speed mismatch trying to attach usb device "Dell USB Entry Keyboard" (( speed) to bus "ehci0.0", port "1" (high speed)
qemu-kvm: Warning: speed mismatch trying to attach usb device "Dell USB Entry Keyboard" (( speed) to bus "ehci0.0", port "1" (high speed)
qemu-kvm: Warning: speed mismatch trying to attach usb device "Dell USB Entry Keyboard" (( speed) to bus "ehci0.0", port "1" (high speed)

Expected results:
One of the following methods is ok for QE.
1, should forbid to boot qemu-kvm when hit speed mismatch.
2, give some warning via QMP, so libvirt can detect this info.

Additional info:

Comment 2 Gerd Hoffmann 2014-11-12 15:01:33 UTC
usb device attach runs asyncrounously, because qemu supports hotplugging usb devices.  So we can neither exit() nor return qmp errors.

We could add some qmp events emitted by usb-host to notify libvirt about errors (and possily attach/detach too).

Needs discission upstream, don't think targeting 7.1 is realistic.

Comment 4 Gerd Hoffmann 2015-04-30 15:46:43 UTC
Related: bug 1179045

Comment 7 Gerd Hoffmann 2016-06-13 12:53:49 UTC
(In reply to Gerd Hoffmann from comment #4)
> Related: bug 1179045

Planned 1179045 fix will handle this one too.

*** This bug has been marked as a duplicate of bug 1179045 ***