qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] 2 issues with qemu-master / 1.2 ehci code
Date: Thu, 16 Aug 2012 21:26:25 +0200	[thread overview]
Message-ID: <502D4961.3060300@redhat.com> (raw)
In-Reply-To: <502CF9BB.8020107@redhat.com>

  Hi,

> Ok, I've managed to significantly narrow this down, this is caused
> by ehci_fill_queue() adding packets to the queue with different
> qtdaddr values then the first one already queued up, this is of
> course more or less fully expected,

Yes.

> but does trigger the assert in question ...

Hmm.  ehci_fill_queue() should neither change EHCIQueue->qtdaddr nor
EHCIPacket->qtdaddr of the first packet queued up.

Also processing the transfer descriptors later on should happen in the
same order the EHCIPacket's are queued up, so there should be no
mismatch either.  I can see how a buggy guest could trigger this
assert() by mucking with the TD queue after setting the active flag on
the TDs, but I think it is unlikely to be the cause as this behavior
violates the ehci specs.

> I can get things working by turning ehci_fill_queue() into a nop... 
> Investigating this further. But if you've any insights they would be
> appreciated. I'm thinking this may be caused by packets completing
> out of order, which could be caused by the special handling of some
> ctrl commands ...

usbredir wouldn't see multiple parallel inflight requests per endpoint
unless you explicitly enable this using usb_ep_set_pipeline().  Doing
that on bulk endpoints should give you a nice performance boost for usb
sticks.  Doing it on the control endpoint is asking for trouble ;)

Can you turn on all ehci tracepoints & send me a log?

cheers,
  Gerd

  reply	other threads:[~2012-08-16 19:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-14 16:12 [Qemu-devel] 2 issues with qemu-master / 1.2 ehci code Hans de Goede
2012-08-15 11:22 ` Hans de Goede
2012-08-15 11:37   ` Gerd Hoffmann
2012-08-16 13:46 ` Hans de Goede
2012-08-16 19:26   ` Gerd Hoffmann [this message]
2012-08-17  6:31     ` Hans de Goede
2012-08-17  7:07       ` Gerd Hoffmann
2012-08-17  7:16         ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=502D4961.3060300@redhat.com \
    --to=kraxel@redhat.com \
    --cc=hdegoede@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).