qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: "Gabriel L. Somlo" <gsomlo@gmail.com>
Cc: rene@exactcode.com, jbaron@redhat.com, qemu-devel@nongnu.org,
	agraf@suse.de
Subject: Re: [Qemu-devel] q35, usb-ehci1, and Mac OS X boot problems
Date: Tue, 13 Nov 2012 17:31:42 +0100	[thread overview]
Message-ID: <50A275EE.10004@redhat.com> (raw)
In-Reply-To: <20121113154824.GA11399@hedwig.ini.cmu.edu>

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

On 11/13/12 16:48, Gabriel L. Somlo wrote:
> Gerd,
> 
> On Tue, Nov 13, 2012 at 09:48:10AM +0100, Gerd Hoffmann wrote:
>>> below is what I got running the "-usb -device usb-kbd -device usb-mouse"
>>> command line with EHCI_DEBUG set to 1.
>>
>> This isn't what I ment.  See docs/tracing.txt for how tracepoint work.
>> Wildcards (i.e. 'ehci_*') work on tracepoints.
> 
> Below are the first 100 (of 6516784) ascii lines from the ehci_* trace
> file I collected in the cca. 30 seconds it took to get to the point
> where it's clear OS X boot is stuck and won't be making any further
> progress.
>
> In case you need it, the full (11M xz-compressed) trace file is at
> http://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/ehci_trace.xz

The last lines of the log are more useful, which is more than 6500000
lines like this:

usb_ehci_opreg_read 4.767 addr=0x2c str=FRINDEX val=0x0

So macos seems to expect the frame index updating, and probably frame
list rollover interrupts too.  ehci doesn't do that of there is nothing
else to do, to keep the wakeup rate down.

Does the attached patch change anything?

In case it doesn't:  Any change in behavior if you add a usb-storage device?

cheers,
  Gerd

[-- Attachment #2: 0001-ehci-keep-the-frame-timer-running-in-case-the-guest-.patch --]
[-- Type: text/plain, Size: 876 bytes --]

>From 822934d5118c18707a6781e006c35482186f2b12 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Tue, 13 Nov 2012 17:20:05 +0100
Subject: [PATCH] ehci: keep the frame timer running in case the guest asked for frame list rollover interrupts

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/hcd-ehci.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index ee6c9ae..20766d8 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -2209,6 +2209,10 @@ static void ehci_frame_timer(void *opaque)
         ehci->async_stepdown = 0;
     }
 
+    if (ehci->usbintr & USBSTS_FLR) {
+        need_timer++;
+    }
+
     if (need_timer) {
         /* If we've raised int, we speed up the timer, so that we quickly
          * notice any new packets queued up in response */
-- 
1.7.1


  reply	other threads:[~2012-11-13 16:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-11 22:16 [Qemu-devel] q35, usb-ehci1, and Mac OS X boot problems Gabriel L. Somlo
2012-11-12 10:26 ` Gerd Hoffmann
2012-11-12 14:49   ` [Qemu-devel] [PATCH] ehci: fix compile error with EHCI_DEBUG enabled Gabriel L. Somlo
2012-11-16 13:50     ` Stefan Hajnoczi
2012-11-16 13:54       ` Gerd Hoffmann
2012-11-12 15:17   ` [Qemu-devel] q35, usb-ehci1, and Mac OS X boot problems Gabriel L. Somlo
2012-11-13  8:48     ` Gerd Hoffmann
2012-11-13 15:48       ` Gabriel L. Somlo
2012-11-13 16:31         ` Gerd Hoffmann [this message]
2012-11-13 17:28           ` Gabriel L. Somlo

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=50A275EE.10004@redhat.com \
    --to=kraxel@redhat.com \
    --cc=agraf@suse.de \
    --cc=gsomlo@gmail.com \
    --cc=jbaron@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rene@exactcode.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).