qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] qemu usb-linux.c vl.h hw/esp.c hw/lsi53c895a.c ...


From: Fabrice Bellard
Subject: Re: [Qemu-devel] qemu usb-linux.c vl.h hw/esp.c hw/lsi53c895a.c ...
Date: Sat, 12 Aug 2006 14:31:21 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

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.




reply via email to

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