Bug 735009

Summary: Qemu-kvm fails to prompt error when add usb-hub to a non-exist uhci port and qemu-kvm hangs when delete this usb-hub
Product: Red Hat Enterprise Linux 6 Reporter: Shaolong Hu <shu>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 6.2CC: juzhang, kraxel, michen, mkenneth, qzhou, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-01 13:18:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Shaolong Hu 2011-09-01 07:23:06 UTC
Description of problem:
Can hotplug a usb-hub to non-exist uhci port, there won't be any prompt, when hotunplug this hub, qemu-kvm hangs.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Boot guest with:
/usr/libexec/qemu-kvm -enable-kvm -M rhel6.2.0 -smp 4 -m 4G -name rhel6.1-64 -uuid 3f2ea5cd-3d29-48ff-aab2-23df1b6ae213 -drive file=RHEL-Server-6.1-64-virtio.qcow2,cache=none,if=none,rerror=stop,werror=stop,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,drive=drive-virtio-disk0,id=device-virtio-disk0,bootindex=1 -netdev tap,script=/etc/qemu-ifup,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0 -boot order=cd,menu=on -monitor stdio -vnc :30 -usb

2.In qemu monitor:
device_add usb-hub,port=5,id=hub1

3.In qemu monitor:
device_del hub1

Actual results:
1.After step 2:

in guest:
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

in qemu monitor:
(qemu) info usb
  Device 0.0, Port .5, Speed 12 Mb/s, Product QEMU USB Hub
(qemu) info qtree
      dev: piix3-usb-uhci, id ""
        dev-prop: masterbus = <null>
        dev-prop: firstport = 0
        bus-prop: addr = 01.2
        bus-prop: romfile = <null>
        bus-prop: rombar = 1
        bus-prop: multifunction = off
        class USB controller, addr 00:01.2, pci id 8086:7020 (sub 1af4:1100)
        bar 4: i/o at 0xc020 [0xc03f]
        bus: usb.0
          type USB
          dev: usb-hub, id "hub1"
            bus-prop: port = "5"
            addr 0.0, port .5, speed 12, name QEMU USB Hub, attached

3.After step 3, qemu-kvm hangs.

Expected results:
Qemu-kvm should prompt error when hotplug usb-hub to a non-exist uhci port.

Additional info:
Ehci won't hit this issue.

Comment 2 Gerd Hoffmann 2011-09-01 13:18:40 UTC

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