Bug 613950 - Hot-plugging piix3-usb-uhci doesn't work
Hot-plugging piix3-usb-uhci doesn't work
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Virtualization Maintenance
Virtualization Bugs
:
Depends On:
Blocks: 563347 580953
  Show dependency treegraph
 
Reported: 2010-07-13 06:59 EDT by juzhang
Modified: 2013-01-09 17:51 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
USB hot plug is not supported in 6.0
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-09-21 08:21:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description juzhang 2010-07-13 06:59:07 EDT
Description of problem:
After hot plug in usb disk to linux guest,however,using fdisk -l,can't find this usb storage device in guest. I tested guest rhel6_64,rhel6_32 and rhel5.5_64.all can't find usb storage device.

Version-Release number of selected component (if applicable):
#uname -r
2.6.32-44.el6.x86_64
#rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.91.el6.x86_64

How reproducible:


Steps to Reproduce:
1.Boot guest
#/usr/libexec/qemu-kvm -m 2G -smp 2 -drive file=/root/zhangjunyi/rhel6.32.raw,if=none,id=test,boot=on,cache=none,format=raw -device virtio-blk-pci,drive=test -cpu qemu64,+sse2,+x2apic -monitor stdio -drive file=/root/zhangjunyi/boot.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,drive=drive-ide0-1-0 -boot order=cdn,menu=on -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=22:11:22:45:66:93 -vnc :9 -qmp tcp:0:4445,server,nowait -drive if=floppy,file=/root/zhangjunyi/floppy.img

2.telnet the qmp and issue qmp_capabilities
#{"execute":"qmp_capabilities"}

3.hot add piix3-usb-uhci driver
#{"execute":"device_add","arguments":{"driver":"piix3-usb-uhci","id":"uhciusb1"}}

4.hot add usb storage driver and device
#{"execute":"__com.redhat_drive_add", "arguments": {"file":"/root/zhangjunyi/usb.img","id":"usb1"}}
#{"execute":"device_add","arguments":{"driver":"usb-storage","drive":"usb1","id":"dusb1"}}
  
Actual results:
After step4,In guest,can't find usb storage,just find USB Controller
# lspci 
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 SCSI storage controller: Qumranet, Inc. Virtio block device
00:04.0 Ethernet controller: Qumranet, Inc. Virtio network device
00:05.0 USB Controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
# lsusb 
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Expected results:
Find usb storage and works well

Additional info:
Please note
1.I also using the same steps tested on winxp 32 guest.In window xp guest,can find usb storage and device work well.

2.If using the following steps,can find usb storage and device work well.

1. boot guest with -device piix3-usb-uhci,id=uhci123
 /usr/libexec/qemu-kvm -m 2G -smp 2 -drive file=/root/zhangjunyi/rhel6.32.raw,if=none,id=test,boot=on,cache=none,format=raw -device virtio-blk-pci,drive=test -cpu qemu64,+sse2,+x2apic -monitor stdio -drive file=/root/zhangjunyi/boot.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,drive=drive-ide0-1-0 -boot order=cdn,menu=on -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=22:11:22:45:66:93 -vnc :9 -qmp tcp:0:4445,server,nowait -drive if=floppy,file=/root/zhangjunyi/floppy.img -device piix3-usb-uhci,id=uhci3

2.telnet the qmp and issue qmp_capabilities
#{"execute":"qmp_capabilities"}


3.hot add usb storage driver and device
#{"execute":"__com.redhat_drive_add", "arguments": {"file":"/root/zhangjunyi/usb.img","id":"usb1"}}
#{"execute":"device_add","arguments":{"driver":"usb-storage","drive":"usb1","id":"dusb1"}}
Comment 2 Dor Laor 2010-07-15 08:06:06 EDT
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.

New Contents:
USB hot plug is not supported in 6.0
Comment 3 Markus Armbruster 2010-07-23 10:12:24 EDT
According to the description, hot-plugging usb-storage into a system started with a USB controller works just fine.  Problems arise only when we start without a USB controller, then hot-plug piix3-usb-uhci. Therefore, this bug isn't about hot-plugging usb-storage, it's about hot-plugging piix3-usb-uhci.

piix3-usb-uhci is a function of the PIIX3 southbridge.  A real PIIX3 can't be hot-plugged (let alone of its individual functions).  I figure the real bug is that we permit hot-plug of the virtual piix3-usb-uhci.

libvirt always starts guests with -usb, which cold-plugs a piix3-usb-uhci.
Comment 4 juzhang 2010-07-25 22:54:12 EDT
Would you please tell me support piix4-usb-uhci?
I means,boot guest with -device piix4-usb-uhci,id=uhci4 -drive id=usb_disk,file=usbdisk.img,if=none  -device usb-storage,drive=usb_disk?
Comment 5 Markus Armbruster 2010-07-26 03:37:50 EDT
libvirt always uses -usb, which creates piix4-usb-uhci automatically. There is no need for -device piix4-usb-uhci then.

Use other than through libvirt is unsupported.  Thus, the supported way to get piix4-usb-uhci is -usb.

I'm investigating whether we piix4-usb-uhci should be made unavailable with -device.

If this doesn't answer your question (I'm not sure I got it), please rephrase it.
Comment 6 juzhang 2010-07-26 04:29:33 EDT
Would you please tell me which is default between piix3-usb-uhci and piix4-usb-uhci for libvirt uses -usb.if default is piix4-usb-uhci,i want to use piix3-usb-uhci,what should i do?thanks in advance!
Comment 7 Markus Armbruster 2010-07-26 09:38:37 EDT
-usb picks the USB controller appropriate for the board, which is piix3-usb-uhci for the boards we have in RHEL-6.  I don't think using another is supported.
Comment 8 juzhang 2010-07-27 02:17:39 EDT
(In reply to comment #7)
> -usb picks the USB controller appropriate for the board, which is
> piix3-usb-uhci for the boards we have in RHEL-6.  I don't think using another
> is supported.    

Got it,thanks armbru.
Comment 11 Dor Laor 2010-09-21 08:21:25 EDT
Closing this issue since according to https://bugzilla.redhat.com/show_bug.cgi?id=613950#c3 this wasn't meant to work and preventing it is not that important since we're only suporting qemu-kvm through libvirt

Note You need to log in before you can comment on or make changes to this bug.