qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] 2 issues with qemu-master / 1.2 ehci code


From: Hans de Goede
Subject: Re: [Qemu-devel] 2 issues with qemu-master / 1.2 ehci code
Date: Fri, 17 Aug 2012 09:16:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

Hi,

On 08/17/2012 09:07 AM, Gerd Hoffmann wrote:
   Hi,

2) happens when a packet fails, and the queue should be halted, in
this case

Should we just cancel all queued packets on endpoint halts then?  If the
guest decides to go on we'll easily re-queue everything (with the
existing code).  If the guest does something else we don't have to do
anything special.

Not canceling, then trying to figure what the new state of the already
queued packets is could become tricky ...


Yeah, actually I've come to the same conclusion, after wasting almost a day
trying to get things to work the "figure what the new state of the already
queued packets is" way, and that indeed is not the way to go!

Spo I've just written a patch cancelling all the queued up packets, testing
that now :)

Another problem with failing packets is that hw/usb/core.c will
happily execute the next packet in the ep queue, even though the spec
says the ep-queue should be halted, giving the guest a chance to
cancel transfers after the failed one without them ever executing.
I've a poc patch fixing this too.

Indeed, the core should stop processing them.  Question is what to do
then.  If the host controller cancels all packets anyway we don't have
to do much extra work on the core.  Just stop processing on error and
implicitly un-halt the endpoint when the queue becomes empty.  Maybe
some extra state tracking and asserts() to catch bugs.

Right, also done in my wip patch. I'll go test it, then split it up in
multiple patches and then submit. We really should get this in 1.2 btw!





reply via email to

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