qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] USB2.0 disk format failure in windows guest


From: Gonglei (Arei)
Subject: Re: [Qemu-devel] USB2.0 disk format failure in windows guest
Date: Wed, 17 Apr 2013 11:15:22 +0000

> 
> > Fixing this will require qemu to copy the beginning and ending parts of
> > these non-aligned qTDs into separate bounce buffers so that the URB
> > length can be divisible by 512.
> 
> Worth trying:  http://www.kraxel.org/cgit/qemu/log/?h=usb.80
> 
> It puts the qemu usb passthrough code upside down.  All xfers will go
> through a bounce buffer, requests are submitted via libusbx.  That
> should fix it.  Of course there is the risk of regressions in other
> areas as it is all new code.  Also make sure you have libusbx-devel
> installed, otherwise qemu will fallback to the old code which uses usbfs
> ioctls directly.
>

That's great! According to Gerd's patch, I format USB2.0 disk successfully in 
windows guest.
Get to log below by usbmon:

ffff880c0e7e15c0 4071447263 S Bo:6:009:2 -115 31 = 55534243 08903b84 00020000 
80000a28 0000eebf ff000001 00000000 000000
ffff880c0e7e15c0 4071447428 C Bo:6:009:2 0 31 >
ffff880c0e7e15c0 4071448094 S Bi:6:009:1 -115 512 <
ffff880c0e7e15c0 4071448302 C Bi:6:009:1 0 512 = 00000000 00000000 00000000 
00000000 00000000 00000000 00000000 00000000
ffff880c0e7e15c0 4071448946 S Bi:6:009:1 -115 512 <
ffff880c0e7e15c0 4071449077 C Bi:6:009:1 -121 13 = 55534253 08903b84 00000000 00
ffff880c0e7e15c0 4071449891 S Bo:6:009:2 -115 31 = 55534243 08109984 00000100 
00000a2a 00000008 de000080 00000000 000000
ffff880c0e7e15c0 4071450057 C Bo:6:009:2 0 31 >
ffff880c0e7e15c0 4071454013 S Bo:6:009:2 -115 16384 = f8ffff0f ffffff0f 
ffffff0f 00000000 00000000 00000000 00000000 00000000
ffff880c0e7e1800 4071454319 S Bo:6:009:2 -115 3584 = 00000000 00000000 00000000 
00000000 00000000 00000000 00000000 00000000
ffff880c0e7e15c0 4071454940 C Bo:6:009:2 0 16384 >
ffff880c0e7e1800 4071454974 C Bo:6:009:2 0 3584 >
ffff880c0e7e1800 4071456846 S Bo:6:009:2 -115 16384 = 00000000 00000000 
00000000 00000000 00000000 00000000 00000000 00000000
ffff880c0e7e1800 4071457406 C Bo:6:009:2 0 16384 >
ffff880c0e7e1800 4071458841 S Bo:6:009:2 -115 16384 = 00000000 00000000 
00000000 00000000 00000000 00000000 00000000 00000000
ffff880c0e7e1800 4071460280 C Bo:6:009:2 0 16384 >
ffff880c0e7e1800 4071461412 S Bo:6:009:2 -115 12800 = 00000000 00000000 
00000000 00000000 00000000 00000000 00000000 00000000
ffff880c0e7e1800 4071461905 C Bo:6:009:2 0 12800 >
ffff880c0e7e1800 4071462620 S Bi:6:009:1 -115 512 <
ffff880c0e7e1800 4071462780 C Bi:6:009:1 -121 13 = 55534253 08109984 00000000 00
ffff880c0e7e1800 4071463486 S Bo:6:009:2 -115 31 = 55534243 08903b84 00000100 
00000a2a 00000009 5e000080 00000000 000000
ffff880c0e7e1800 4071463528 C Bo:6:009:2 0 31 >

> > After our repeated verification and debug, we found that windows
> > virtual machine USB disk format will send a 64Kbits's URB packet
> > which was divided into four QTD (Size: 19968,16384,16384,12800):

19968 = 16384 + 3584, and all the URBs size that is a multiple of 512. (usbfs 
places a 16kb limit on bulk URBs)
Alan & Gerd, Thanks a lot!

Best Regards!
-Gonglei




reply via email to

[Prev in Thread] Current Thread [Next in Thread]