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: Wed, 15 Aug 2012 13:37:46 +0200 [thread overview]
Message-ID: <502B8A0A.6000402@redhat.com> (raw)
In-Reply-To: <502B8682.2050109@redhat.com>
On 08/15/12 13:22, Hans de Goede wrote:
> Hi,
>
> On 08/14/2012 06:12 PM, Hans de Goede wrote:
>> Hi,
>>
>> While testing qemu-master I've encountered 2 problems caused by the
>> ehci changes
>> made since 1.1:
>>
>> 1) Newly plugged in devices don't get recognized by the guest
>> This seems to be a case of no interrupt getting generated while it
>> should, doing lsusb in a linux
>> guest makes the device show up (after the lsusb, so its there in a
>> second lsusb run)
>
> I've been looking into this one and I think I know what is going on, the
> problem is caused by
> the "ehci: implement Interrupt Threshold Control support" patch:
> http://www.kraxel.org/cgit/qemu/commit/?h=usb.57&id=7efc17af9a08839a05771541959696875e06cf99
>
>
> What happens is that since neither the async, nor the periodic schedule
> are enabled the
> frame-timer is not running, and during the attaching of the device the
> Port Change Events
> (PCD) status bit should get raised multiple times due to port resets,
> etc. But after the
> first call to commit_irq, usbsts_frindex contains frindex + 1 (in case
> of a linux guest),
> so commit_irq turns into a nop and the guest never sees any of the PCD
> interrupts other then
> the first.
>
> Part of the problem is that the Interrupt Threshold Control support
> patch delays all
> interrupts, which it should not, according to the EHCI spec section 4.15
> (ehci-r10.pdf
> page 115), the following irqs should not be delayed: Port Change Events
> (PCD),
> Frame List Rollover (FLR), and Host System Error (HSE). So we need to
> change the code
> to not delay these. Once that is done I expect the attach problem I've
> been seeing
> to magically go away.
Makes sense.
>> 2) I'm hitting:
>> qemu-system-x86_64: /home/hans/projects/qemu/hw/usb/hcd-ehci.c:2075:
>> ehci_state_executing: Assertion `p->qtdaddr == q->qtdaddr' failed.
>> When trying to redirect a microsoft lifecam, since this is a device
>> with multiple interfaces
>> (both uvc and usb-audio) I think it may be a case of multiple control
>> requests getting submitted at the same time,
>> but that is just a wild guess.
Could be QH revalidation not being careful enougth (see commit
9bc3a3a216e2689bfcdd36c3e079333bbdbf3ba0)
> I've not made any progress with this one yet. kraxel, any chance you
> could join #spice
> on gimpnet so we can discuss this one interactively ?
Busy debugging ehci live migration issues and I'd prefer to finish that
first.
cheers,
Gerd
next prev parent reply other threads:[~2012-08-15 11:37 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 [this message]
2012-08-16 13:46 ` Hans de Goede
2012-08-16 19:26 ` Gerd Hoffmann
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=502B8A0A.6000402@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).