Bug 1003771

Summary: warning msg not correct after hotplug invalid usb-host to guest
Product: Red Hat Enterprise Linux 6 Reporter: ShupingCui <scui>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 6.5CC: acathrow, bsarathy, juzhang, kraxel, michen, minovotn, mkenneth, qzhang, scui, shuang, shu, tlavigne, virt-maint, xwei
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.407.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-11 07:30:00 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:

Description ShupingCui 2013-09-03 07:38:40 UTC
Description of problem:
warning msg not correct after hotplug invalid usb-host to guest

Version-Release number of selected component (if applicable):
Host:
# uname -r
2.6.32-358.18.1.el6.x86_64
# rpm -qa | grep qemu
gpxe-roms-qemu-0.9.7-6.9.el6.noarch
qemu-img-rhev-0.12.1.2-2.399.el6.x86_64
qemu-kvm-rhev-tools-0.12.1.2-2.399.el6.x86_64
qemu-guest-agent-0.12.1.2-2.355.el6.x86_64
qemu-kvm-rhev-debuginfo-0.12.1.2-2.399.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.399.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1. boot the guest
/usr/libexec/qemu-kvm \
    -name 'virt-tests-vm1' \
    -nodefaults \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=0x4 \
    -device piix3-usb-uhci,id=usbtest,bus=pci.0,addr=0x5 \
    -drive file='/root/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/RHEL-Server-6.4-64-virtio.qcow2',index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,snapshot=off,format=qcow2,aio=native \
    -device virtio-blk-pci,bus=pci.0,addr=0x6,drive=drive-virtio-disk1,bootindex=0 \
    -device e1000,netdev=idZ9Ft18,mac='9a:54:55:56:57:58',bus=pci.0,addr=0x3,id='idBzQGb2' \
    -netdev tap,id=idZ9Ft18 \
    -m 2048 \
    -smp 1,maxcpus=1,cores=1,threads=1,sockets=2 \
    -cpu 'Penryn' \
    -M rhel6.4.0 \
    -device AC97,addr=0x7 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
    -vnc :0 \
    -vga cirrus \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off   \
    -no-kvm-pit-reinjection \
    -enable-kvm \
    -monitor stdio

2. hotplug invalid usb-host to guest
(qemu) device_add usb-host,bus=usbtest.0,id=usbhostdev,vendorid=aaa,productid=aaa
3.

Actual results:
husb: using sys file-system with /dev/bus/usb

Expected results:
Property 'usb-host.productid' doesn't take value 'aaa'

Additional info:

Comment 4 Shaolong Hu 2013-10-10 08:21:30 UTC
Test with qemu-kvm-0.12.1.2-2.410.el6.x86_64:

(qemu) info usb
  Device 0.1, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
  Device 0.2, Port 2, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.1, Port 3, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.1, Port 4, Speed 12 Mb/s, Product QEMU USB Keyboard
  Device 0.1, Port 5, Speed 12 Mb/s, Product QEMU USB Mouse
(qemu) device_add usb-host,bus=usbtest.0,id=usbhostdev,vendorid=aaa,productid=aaa
Bus 'usbtest.0' not found
(qemu) device_add usb-host,id=usbhostdev,vendorid=aaa,productid=aaa
(qemu) info usb
  Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
  Device 0.3, Port 2, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.4, Port 3, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.2, Port 4, Speed 12 Mb/s, Product QEMU USB Keyboard
  Device 0.2, Port 5, Speed 12 Mb/s, Product QEMU USB Mouse
  Device 0.0, Port 6, Speed 1.5 Mb/s, Product USB Host Device


Non-existed bus can be detected, but failed with non-existed vendor id and product id when don't specify bus, re-assign.

Comment 5 Qunfang Zhang 2013-10-10 08:36:08 UTC
Hi, Gerd

Could you help take a look at comment 4?  Thanks.

Comment 6 Gerd Hoffmann 2013-10-10 11:09:52 UTC
Minor issue, missing sanity check.
IMO not important enough to fix in RHEL-6.

Does it reproduce in RHEL-7?

Comment 7 Shaolong Hu 2013-10-11 07:20:00 UTC
(In reply to Gerd Hoffmann from comment #6)
> Minor issue, missing sanity check.
> IMO not important enough to fix in RHEL-6.
> 
> Does it reproduce in RHEL-7?

On RHEL7, works fine:

(qemu) device_add usb-host,id=usbhostdev,vendorid=aaa,productid=aaa
Property 'usb-host.productid' doesn't take value 'aaa'

Comment 8 Qunfang Zhang 2013-10-11 07:22:25 UTC
Hi, Gerd

Maybe we don't plan to fix it in rhel6.5? Ademar move it to rhel6.6.0. And as this is not a critical bug, we agree to fix it in next release. If so, I will request Michal's help to remove it from the errata.

Thanks,
Qunfang

Comment 9 Gerd Hoffmann 2013-10-11 07:30:00 UTC
I don't think this is serious enougth for any rhel-6.x.  As rhel-7 isn't affected there is no reason to move it to rhel-7 -> wontfix.