qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Shawn Starr <shawn.starr@rogers.com>
Cc: qemu-devel@nongnu.org, gerd@kraxel.org
Subject: Re: [Qemu-devel] EHCI USB regression in 1.2.0 - ehci_state_fetchqtd() asserting
Date: Thu, 20 Sep 2012 17:37:44 +0200	[thread overview]
Message-ID: <505B3848.9070802@redhat.com> (raw)
In-Reply-To: <3321480.8UDes0xfFC@segfault.sh0n.net>

Hi,

On 09/19/2012 06:42 PM, Shawn Starr wrote:
> Hello QMU folks,
>
> The latest EHCI patches and or USB redirection ones have caused a regression. Using the (legacy) qemu-kvm git master repository which does
> not have these patches (not sure which patch is causing assert specifically yet). Using a Logitech QuickCam Pro 9000 and starting  a Windows VM
> will crash when the device is detected.
>
> Crash in log:
>
> qemu-kvm: /builddir/build/BUILD/qemu-kvm-1.2.0/hw/usb/hcd-ehci.c:2018: ehci_state_fetchqtd: Assertion `0' failed.
> 2012-09-19 15:36:04.011+0000: shutting down
>
> I only came to this conclusion after noticing at least in Fedora that 1.2.0-rc1 did not have any of the EHCI and USB redirection patches added. So by using the -rc1 spec
> file w/o the patches I can use Qemu/KVM successfully w/ webcam and no asserts.
>
> I have also installed:  usbredir-0.5-1.fc18.x86_64

Thanks for reporting this. This is caused by a recent change to
fix a memory leak inside the ehci codes interrupt ep handling, together with:

     // TODO Windows does not seem to ever set the MULT field

The above windows bug (not setting the MULT field is against the spec), causes
ehci_state_execute() to exit without even executing the packet once, which
leaves the packet in an uninitialized state. And when fetchqtd then later on sees
there already is a packet in flight for the ep queue, it barfs on it not being
initialized.

I already had looking into the windows MULT issue on my to do, so I've just
bumped it to the top :)

Unfortunately I cannot reproduce what you are seeing even though I do have
a logitech pro 9000 to test with myself. I've tried with both a 32 bits
windows XP as a 32 bits windows 7, what guest OS are you running?

Besides not being able to reproduce I've written what I believe is a fix for
this. I'll post that to the list right after this mail.

Can you test qemu build with the fix added? And please also set the usb-redir
device's debug parameter to 4 and send me the generated qemu log ? This will
allow me to see not only the assert is gone but that also the interrupt ep is
working properly...

To set the debug to 4 use ie:
-device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=4

Do this for all the usb-redir devices on your cmdline!

Regards,

Hans

  parent reply	other threads:[~2012-09-20 15:36 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-19 16:42 [Qemu-devel] EHCI USB regression in 1.2.0 - ehci_state_fetchqtd() asserting Shawn Starr
2012-09-19 16:53 ` Shawn Starr
2012-09-20 15:37 ` Hans de Goede [this message]
2012-09-20 19:08   ` Shawn Starr
2012-09-20 23:28   ` Shawn Starr
     [not found]   ` <6177450.mT8I4ey0nz@segfault.sh0n.net>
2012-09-21  0:04     ` Shawn Starr
2012-09-21 12:19       ` Hans de Goede
2012-09-21 15:39         ` Shawn Starr
2012-09-21 17:35           ` Hans de Goede
2012-09-21 18:46             ` Shawn Starr
2012-09-23 10:03               ` Hans de Goede
2012-09-23 18:00                 ` Shawn Starr
2012-09-23 18:20                   ` Shawn Starr
2012-09-23 18:52                     ` Shawn Starr
2012-09-24  9:52                       ` Hans de Goede
2012-09-24 14:24                         ` Shawn Starr
2012-09-24  9:50                     ` Hans de Goede
2012-09-24 14:20                       ` Shawn Starr
2012-09-24 14:36                         ` Hans de Goede
2012-09-24 14:38                           ` Shawn Starr
2012-10-02 15:26                             ` Shawn Starr
2012-10-08 11:27                               ` Hans de Goede
2012-10-08 13:01                                 ` Johannes Stezenbach
2012-10-08 13:51                                   ` Hans de Goede
2012-10-08 14:49                                     ` Johannes Stezenbach
2012-10-08 15:03                                       ` Hans de Goede
2012-10-08 16:11                                         ` Johannes Stezenbach
2012-10-08 20:10                                           ` Hans de Goede
2012-10-08 20:18                                             ` Shawn Starr
2012-10-08 21:32                                               ` Hans de Goede
2012-10-08 21:37                                                 ` Shawn Starr

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=505B3848.9070802@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=gerd@kraxel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shawn.starr@rogers.com \
    /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).