* [Qemu-devel] USB problem in QEMU
@ 2007-04-05 7:23 Yu, Xiaoyang
2007-04-09 9:46 ` [Qemu-devel] " Raúl Sánchez Siles
0 siblings, 1 reply; 7+ messages in thread
From: Yu, Xiaoyang @ 2007-04-05 7:23 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1.1: Type: text/plain, Size: 4169 bytes --]
Hi guys,
The USB problem I met is that using some kind of USB disks will cause
guest OS run extremely slow, while these disks can work properly in host
OS. It looks like the USB simulation in QEMU is not fully featured, and
can not handle some error conditions properly.
Below are the /proc/bus/usb/devices information in the host OS for four
type of USB disks. The first two disks can work properly in guest OS;
while the last two disks will cause the gust OS extremely slow (like not
responding).
The /proc/bus/usb/devices information in host OS for USB disks which
works properly in guest OS:
========================================================================
=======================
T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=1043 ProdID=8006 Rev= 1.00
S: Manufacturer=Generic
S: Product=Flash Disk
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50
Driver=usb-storage
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 6 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0930 ProdID=6533 Rev= 1.00
S: Manufacturer=Kingston
S: Product=DataTraveler 2.0
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50
Driver=usb-storage
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=31875us
E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=64ms
The /proc/bus/usb/devices information in host OS for USB disks which
does not work properly in guest OS:
========================================================================
==============================================
T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0ed1 ProdID=6680 Rev= 1.00
S: Manufacturer=Generic
S: Product=Mass Storage Device
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 50mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50
Driver=usb-storage
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 4 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0204 ProdID=6025 Rev= 1.00
S: Manufacturer=USB0612
S: Product=Flash Disk
S: SerialNumber=335657409262
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50
Driver=usb-storage
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
To get more information, I turned on the DEBUG_PACKET macro in
xen/tools/ioemu/hw/usb-uhci.c to get QEMU log messages. The logs contain
the UHCI packets. You may kindly find the log files in the attachment.
"log.good" is the log file for inserting a "good" disk which works
properly in guest OS. "log.bad" is the log file for inserting a "bad"
disk which cause the guest OS not responding.
We analyzed the log files.
In line 149 of "log.bad", there is a "ret=-3", which means there was
error sending the SETUP packet to endpoint 0. There are also errors for
receiving IN packets from endpoint 0.
In line 247 of "log.bad", there is a "handle_data: errno=32", which
means a "broken pipe" error. Then from line 255 of "log.bad", there are
lots of "ret=-2" error for receiving IN packets from endpoint 2.
For compare, we used Device Monitoring Studio to log the URBs on Windows
XP host OS when inserting the "bad" USB disk. You may check it in the
attachment as "usb.htm". In record 000061 of "usb.htm", there is a
"Reset Pipe" URB message.
Compare "log.bad" and "usb.htm", we guess maybe the QEMU do not send
"Reset Pipe" message upon a "broken pipe" error.
Any instructions or comments will be much appreciated.
Regards
Xiaoyang
[-- Attachment #1.2: Type: text/html, Size: 16903 bytes --]
[-- Attachment #2: log files.zip --]
[-- Type: application/x-zip-compressed, Size: 144358 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] Re: USB problem in QEMU
2007-04-05 7:23 [Qemu-devel] USB problem in QEMU Yu, Xiaoyang
@ 2007-04-09 9:46 ` Raúl Sánchez Siles
2007-04-23 9:19 ` Raúl Sánchez Siles
0 siblings, 1 reply; 7+ messages in thread
From: Raúl Sánchez Siles @ 2007-04-09 9:46 UTC (permalink / raw)
To: qemu-devel
Yu, Xiaoyang wrote:
>
>
> The USB problem I met is that using some kind of USB disks will cause
> guest OS run extremely slow, while these disks can work properly in host
> OS. It looks like the USB simulation in QEMU is not fully featured, and
> can not handle some error conditions properly.
>
I've also noticed this, I thought it was a multiconfiguration problem, but
even applying the patch suggested sometime ago here, I could noticed the
slowness.
For this I guess the configuration is linux host and windows guest as is
my case. Slowness started once I issued usb_add on the qemu console and
after finding the emulated system unusable slowness stopped on usb_del on
qemu console again.
I think the problem may be the qemu lacks some usb feature, maybe not
implemented yet. But I would be glad of hear what qemu people has to say
about this.
Thanks.
--
Raúl Sánchez Siles
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] Re: USB problem in QEMU
2007-04-09 9:46 ` [Qemu-devel] " Raúl Sánchez Siles
@ 2007-04-23 9:19 ` Raúl Sánchez Siles
2007-04-23 10:00 ` Yu, Xiaoyang
0 siblings, 1 reply; 7+ messages in thread
From: Raúl Sánchez Siles @ 2007-04-23 9:19 UTC (permalink / raw)
To: qemu-devel
Raúl Sánchez Siles wrote:
> Yu, Xiaoyang wrote:
>
>>
>>
>> The USB problem I met is that using some kind of USB disks will cause
>> guest OS run extremely slow, while these disks can work properly in host
>> OS. It looks like the USB simulation in QEMU is not fully featured, and
>> can not handle some error conditions properly.
>>
> I've also noticed this, I thought it was a multiconfiguration problem,
> but
> even applying the patch suggested sometime ago here, I could noticed the
> slowness.
>
> For this I guess the configuration is linux host and windows guest as is
> my case. Slowness started once I issued usb_add on the qemu console and
> after finding the emulated system unusable slowness stopped on usb_del on
> qemu console again.
>
> I think the problem may be the qemu lacks some usb feature, maybe not
> implemented yet. But I would be glad of hear what qemu people has to say
> about this.
>
I'm still interested in this, I would appreciate some comment about the
issue.
Thanks.
--
Raúl Sánchez Siles
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [Qemu-devel] Re: USB problem in QEMU
2007-04-23 9:19 ` Raúl Sánchez Siles
@ 2007-04-23 10:00 ` Yu, Xiaoyang
2007-04-23 10:54 ` [Qemu-devel] " Raúl Sánchez Siles
0 siblings, 1 reply; 7+ messages in thread
From: Yu, Xiaoyang @ 2007-04-23 10:00 UTC (permalink / raw)
To: rss, qemu-devel
I found that using "usb_add disk:/dev/sda" instead of "usb_add host:1.1" will fix this problem.
Thanks
Xiaoyang
-----Original Message-----
From: qemu-devel-bounces+xiaoyang.yu=intel.com@nongnu.org [mailto:qemu-devel-bounces+xiaoyang.yu=intel.com@nongnu.org] On Behalf Of Raúl Sánchez Siles
Sent: 2007年4月23日 17:20
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: USB problem in QEMU
Raúl Sánchez Siles wrote:
> Yu, Xiaoyang wrote:
>
>>
>>
>> The USB problem I met is that using some kind of USB disks will cause
>> guest OS run extremely slow, while these disks can work properly in host
>> OS. It looks like the USB simulation in QEMU is not fully featured, and
>> can not handle some error conditions properly.
>>
> I've also noticed this, I thought it was a multiconfiguration problem,
> but
> even applying the patch suggested sometime ago here, I could noticed the
> slowness.
>
> For this I guess the configuration is linux host and windows guest as is
> my case. Slowness started once I issued usb_add on the qemu console and
> after finding the emulated system unusable slowness stopped on usb_del on
> qemu console again.
>
> I think the problem may be the qemu lacks some usb feature, maybe not
> implemented yet. But I would be glad of hear what qemu people has to say
> about this.
>
I'm still interested in this, I would appreciate some comment about the
issue.
Thanks.
--
Raúl Sánchez Siles
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] RE: Re: USB problem in QEMU
2007-04-23 10:00 ` Yu, Xiaoyang
@ 2007-04-23 10:54 ` Raúl Sánchez Siles
2007-04-24 2:26 ` Yu, Xiaoyang
0 siblings, 1 reply; 7+ messages in thread
From: Raúl Sánchez Siles @ 2007-04-23 10:54 UTC (permalink / raw)
To: qemu-devel
Yu, Xiaoyang wrote:
> I found that using "usb_add disk:/dev/sda" instead of "usb_add host:1.1"
> will fix this problem.
>
> Thanks
> Xiaoyang
>
Thanks
But what about devices that are not disks?
Regards,
--
Raúl Sánchez Siles
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [Qemu-devel] RE: Re: USB problem in QEMU
2007-04-23 10:54 ` [Qemu-devel] " Raúl Sánchez Siles
@ 2007-04-24 2:26 ` Yu, Xiaoyang
2007-04-24 2:29 ` Yu, Xiaoyang
0 siblings, 1 reply; 7+ messages in thread
From: Yu, Xiaoyang @ 2007-04-24 2:26 UTC (permalink / raw)
To: rss, qemu-devel
The problem I met is that some USB disks will cause the guest OS not responding, and using "usb_add disk:/dev/sda" can fix this problem. For other USB disks, I have not met the same problem.
Thanks
Xiaoyang
-----Original Message-----
From: qemu-devel-bounces+xiaoyang.yu=intel.com@nongnu.org [mailto:qemu-devel-bounces+xiaoyang.yu=intel.com@nongnu.org] On Behalf Of Raúl Sánchez Siles
Sent: 2007年4月23日 18:54
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] RE: Re: USB problem in QEMU
Yu, Xiaoyang wrote:
> I found that using "usb_add disk:/dev/sda" instead of "usb_add host:1.1"
> will fix this problem.
>
> Thanks
> Xiaoyang
>
Thanks
But what about devices that are not disks?
Regards,
--
Raúl Sánchez Siles
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [Qemu-devel] RE: Re: USB problem in QEMU
2007-04-24 2:26 ` Yu, Xiaoyang
@ 2007-04-24 2:29 ` Yu, Xiaoyang
0 siblings, 0 replies; 7+ messages in thread
From: Yu, Xiaoyang @ 2007-04-24 2:29 UTC (permalink / raw)
To: qemu-devel, rss
The problem I met is that some USB disks will cause the guest OS not responding, and using "usb_add disk:/dev/sda" can fix this problem. For other USB devices, I have not met the same problem.
Thanks
Xiaoyang
-----Original Message-----
From: qemu-devel-bounces+xiaoyang.yu=intel.com@nongnu.org [mailto:qemu-devel-bounces+xiaoyang.yu=intel.com@nongnu.org] On Behalf Of Raúl Sánchez Siles
Sent: 2007年4月23日 18:54
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] RE: Re: USB problem in QEMU
Yu, Xiaoyang wrote:
> I found that using "usb_add disk:/dev/sda" instead of "usb_add host:1.1"
> will fix this problem.
>
> Thanks
> Xiaoyang
>
Thanks
But what about devices that are not disks?
Regards,
--
Raúl Sánchez Siles
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-04-24 2:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-05 7:23 [Qemu-devel] USB problem in QEMU Yu, Xiaoyang
2007-04-09 9:46 ` [Qemu-devel] " Raúl Sánchez Siles
2007-04-23 9:19 ` Raúl Sánchez Siles
2007-04-23 10:00 ` Yu, Xiaoyang
2007-04-23 10:54 ` [Qemu-devel] " Raúl Sánchez Siles
2007-04-24 2:26 ` Yu, Xiaoyang
2007-04-24 2:29 ` Yu, Xiaoyang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).