From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYJP3-0005LU-6F for qemu-devel@nongnu.org; Tue, 13 Nov 2012 11:32:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYJP0-00031l-3o for qemu-devel@nongnu.org; Tue, 13 Nov 2012 11:31:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:3901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYJOz-00031a-S9 for qemu-devel@nongnu.org; Tue, 13 Nov 2012 11:31:54 -0500 Message-ID: <50A275EE.10004@redhat.com> Date: Tue, 13 Nov 2012 17:31:42 +0100 From: Gerd Hoffmann MIME-Version: 1.0 References: <20121111221650.GA3575@foober.ini.cmu.edu> <50A0CECA.9060102@redhat.com> <20121112151757.GB2107@hedwig.ini.cmu.edu> <50A2094A.3060500@redhat.com> <20121113154824.GA11399@hedwig.ini.cmu.edu> In-Reply-To: <20121113154824.GA11399@hedwig.ini.cmu.edu> Content-Type: multipart/mixed; boundary="------------090205090906010400070303" Subject: Re: [Qemu-devel] q35, usb-ehci1, and Mac OS X boot problems List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Gabriel L. Somlo" Cc: rene@exactcode.com, jbaron@redhat.com, qemu-devel@nongnu.org, agraf@suse.de This is a multi-part message in MIME format. --------------090205090906010400070303 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 --------------090205090906010400070303 Content-Type: text/plain; name="0001-ehci-keep-the-frame-timer-running-in-case-the-guest-.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-ehci-keep-the-frame-timer-running-in-case-the-guest-.pa"; filename*1="tch" >>From 822934d5118c18707a6781e006c35482186f2b12 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann 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 --- 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 --------------090205090906010400070303--