qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu usb-linux.c vl.h hw/esp.c hw/lsi53c895a.c ...
@ 2006-08-12  1:04 Paul Brook
  2006-08-12 12:31 ` Fabrice Bellard
  2006-08-15 22:56 ` Igor Kovalenko
  0 siblings, 2 replies; 4+ messages in thread
From: Paul Brook @ 2006-08-12  1:04 UTC (permalink / raw)
  To: qemu-devel

CVSROOT:	/sources/qemu
Module name:	qemu
Changes by:	Paul Brook <pbrook>	06/08/12 01:04:27

Modified files:
	.              : usb-linux.c vl.h 
	hw             : esp.c lsi53c895a.c scsi-disk.c usb-hid.c 
	                 usb-hub.c usb-msd.c usb-ohci.c usb-uhci.c usb.c 
	                 usb.h 
	pc-bios        : openbios-sparc32 
Added files:
	pc-bios        : openbios-esp.diff 

Log message:
	SCSI and USB async IO support.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/usb-linux.c?cvsroot=qemu&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/qemu/vl.h?cvsroot=qemu&r1=1.140&r2=1.141
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/esp.c?cvsroot=qemu&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/lsi53c895a.c?cvsroot=qemu&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/scsi-disk.c?cvsroot=qemu&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/usb-hid.c?cvsroot=qemu&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/usb-hub.c?cvsroot=qemu&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/usb-msd.c?cvsroot=qemu&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/usb-ohci.c?cvsroot=qemu&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/usb-uhci.c?cvsroot=qemu&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/usb.c?cvsroot=qemu&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/usb.h?cvsroot=qemu&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/qemu/pc-bios/openbios-sparc32?cvsroot=qemu&rev=1.2
http://cvs.savannah.gnu.org/viewcvs/qemu/pc-bios/openbios-esp.diff?cvsroot=qemu&rev=1.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] qemu usb-linux.c vl.h hw/esp.c hw/lsi53c895a.c ...
  2006-08-12  1:04 [Qemu-devel] qemu usb-linux.c vl.h hw/esp.c hw/lsi53c895a.c Paul Brook
@ 2006-08-12 12:31 ` Fabrice Bellard
  2006-08-12 14:19   ` Paul Brook
  2006-08-15 22:56 ` Igor Kovalenko
  1 sibling, 1 reply; 4+ messages in thread
From: Fabrice Bellard @ 2006-08-12 12:31 UTC (permalink / raw)
  To: qemu-devel

Hi,

OK for the SCSI async support. I am making changes to have a better low 
level handling of CDROMs (both real host CDROMs and emulated ones), but 
I don't know when it will be ready. The changes mostly consists in 
adding a method in the block devices to support packet CD commands.

About async USB, maybe some simplifications are possible. When you have 
a real USB controller, there is always a single current request and you 
don't neep to have provisions to handle several ones (of course more 
complicated host controllers could do that, but it is not useful to 
model it now). Moreover, the devices must reply to the request 
immediately so the request are asynchronous just because it takes a few 
uS to send the data, not because the device blocks (I am not sure it is 
clear for you).

So in QEMU, async USB is not needed in practise for emulated devices. 
For MSD you don't need it for example even if you are using SCSI AIO 
because the host keep polling the MSD storage device until there is an 
SCSI reply.

Async USB is only really needed in the case where QEMU speaks to a host 
device. In this case the operation to send a TD may block (ideally at 
most 1 ms) and it is interesting to hide that to the guest. In this 
case, we must make compromises to hide this fact to the guest. Your 
proposal seems good for that but USB frames will be longer than 1 ms in 
case of host devices (and I am ready to accept that as it is better than 
the previous solution !).

The more complicated implementation would be to suppress USB async as 
you did it but to export to the generic USB layers that list of TD that 
the controller maintains. Then it is possible to submit several requests 
at once to the host devices while having a consistent low level model.

Regards,

Fabrice.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] qemu usb-linux.c vl.h hw/esp.c hw/lsi53c895a.c ...
  2006-08-12 12:31 ` Fabrice Bellard
@ 2006-08-12 14:19   ` Paul Brook
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Brook @ 2006-08-12 14:19 UTC (permalink / raw)
  To: qemu-devel

[following up to record the discussion on IRC]
On Saturday 12 August 2006 13:31, Fabrice Bellard wrote:
> About async USB, maybe some simplifications are possible. When you have
> a real USB controller, there is always a single current request and you
> don't neep to have provisions to handle several ones (of course more
> complicated host controllers could do that, but it is not useful to
> model it now). Moreover, the devices must reply to the request
> immediately so the request are asynchronous just because it takes a few
> uS to send the data, not because the device blocks (I am not sure it is
> clear for you).

Right. It depends which level of the USB spec you're looking at.

At the low level (frames) USB is a bus system. Each TD is send on the bus in 
turn, and the device responds immediately (with a NAK if it is not ready to 
handle the request).

However at a higher level (endpoints) USB Bulk (and Control) transfers can be 
considered to be concurrent packet streams. This is closer to the level at 
which the current async support was intended to work.
With OHCI this matches the interface presented by the host controller. With 
UHCI a bit of guesswork is needed to recover this from the low-level 
frame/queue structures.

Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] qemu usb-linux.c vl.h hw/esp.c hw/lsi53c895a.c ...
  2006-08-12  1:04 [Qemu-devel] qemu usb-linux.c vl.h hw/esp.c hw/lsi53c895a.c Paul Brook
  2006-08-12 12:31 ` Fabrice Bellard
@ 2006-08-15 22:56 ` Igor Kovalenko
  1 sibling, 0 replies; 4+ messages in thread
From: Igor Kovalenko @ 2006-08-15 22:56 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 892 bytes --]

On 8/12/06, Paul Brook <paul@nowt.org> wrote:
>
> CVSROOT:        /sources/qemu
> Module name:    qemu
> Changes by:     Paul Brook <pbrook>     06/08/12 01:04:27
>
> Modified files:
>         .              : usb-linux.c vl.h
>         hw             : esp.c lsi53c895a.c scsi-disk.c usb-hid.c
>                          usb-hub.c usb-msd.c usb-ohci.c usb-uhci.c usb.c
>                          usb.h
>         pc-bios        : openbios-sparc32
> Added files:
>         pc-bios        : openbios-esp.diff
>
> Log message:
>         SCSI and USB async IO support.


Problem in esp.c: if request cannot be handled in one scsi device access,
DMA ptr s->espdmaregs[1]  will be incremented by async transfer size both in
esp_do_dma() and in esp_command_complete(). Removing the one in esp_do_dma()
allows me to boot aurora sparc linux with qemu-system-sparc.

--
Kind Regards,
Igor V. Kovalenko

[-- Attachment #2: Type: text/html, Size: 1964 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-08-15 22:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-12  1:04 [Qemu-devel] qemu usb-linux.c vl.h hw/esp.c hw/lsi53c895a.c Paul Brook
2006-08-12 12:31 ` Fabrice Bellard
2006-08-12 14:19   ` Paul Brook
2006-08-15 22:56 ` Igor Kovalenko

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).