From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8tzB-0003j7-D6 for qemu-devel@nongnu.org; Thu, 30 Jan 2014 10:57:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8tz1-000358-Qp for qemu-devel@nongnu.org; Thu, 30 Jan 2014 10:57:01 -0500 Received: from mail-qa0-x22c.google.com ([2607:f8b0:400d:c00::22c]:58193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8tz1-000353-CQ for qemu-devel@nongnu.org; Thu, 30 Jan 2014 10:56:51 -0500 Received: by mail-qa0-f44.google.com with SMTP id w5so4622574qac.3 for ; Thu, 30 Jan 2014 07:56:50 -0800 (PST) Date: Thu, 30 Jan 2014 10:56:11 -0500 From: "Gabriel L. Somlo" Message-ID: <20140130155610.GG29329@ERROL.INI.CMU.EDU> References: <20140124164608.GB1293@ERROL.INI.CMU.EDU> <20140125000945.GA10357@crash.ini.cmu.edu> <6FAEE645-799D-4535-B568-75AB5E4D206C@suse.de> <20140127225115.GA29329@ERROL.INI.CMU.EDU> <20140128164536.GB29329@ERROL.INI.CMU.EDU> <52E90D87.4010606@suse.de> <20140129213649.GE29329@ERROL.INI.CMU.EDU> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] OSX guest vs. kvm ioapic polarity List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: "imammedo@redhat.com" , "pbonzini@redhat.com" , "lersek@redhat.com" , "qemu-devel@nongnu.org" , "Michael S. Tsirkin" On Thu, Jan 30, 2014 at 12:13:59AM +0100, Alexander Graf wrote: > Can you check whether it configures the ioapic differently? I poked around hw/i386/kvm/ioapic.c, looking for a few good spots to add printf statements. These should be spots where calls from the guest are handled, not where QEMU itself sets up before starting the guest, as I expect the latter is all the same regardless. kvm_ioapic_set_irq() seemed like a good candidate. When starting (without the kvm kernel-side patch), OS X logs the following, before it hangs: kvm_ioapic_set_irq(opaque=0x7f2480a71d10, irq=19, level=1) kvm_ioapic_set_irq(opaque=0x7f2480a71d10, irq=16, level=1) kvm_ioapic_set_irq(opaque=0x7f2480a71d10, irq=17, level=1) kvm_ioapic_set_irq(opaque=0x7f2480a71d10, irq=18, level=1) kvm_ioapic_set_irq(opaque=0x7f2480a71d10, irq=16, level=1) Fedora (which works fine) looks like this: kvm_ioapic_set_irq(opaque=0x7f42ced4cae0, irq=16, level=0) kvm_ioapic_set_irq(opaque=0x7f4c5516eae0, irq=17, level=0) kvm_ioapic_set_irq(opaque=0x7f4c5516eae0, irq=18, level=0) kvm_ioapic_set_irq(opaque=0x7f4c5516eae0, irq=19, level=0) kvm_ioapic_set_irq(opaque=0x7f4c5516eae0, irq=19, level=1) kvm_ioapic_set_irq(opaque=0x7f4c5516eae0, irq=16, level=1) kvm_ioapic_set_irq(opaque=0x7f4c5516eae0, irq=19, level=0) kvm_ioapic_set_irq(opaque=0x7f4c5516eae0, irq=16, level=0) kvm_ioapic_set_irq(opaque=0x7f4c5516eae0, irq=19, level=1) kvm_ioapic_set_irq(opaque=0x7f4c5516eae0, irq=19, level=0) kvm_ioapic_set_irq(opaque=0x7f4c5516eae0, irq=16, level=1) kvm_ioapic_set_irq(opaque=0x7f4c5516eae0, irq=16, level=0) kvm_ioapic_set_irq(opaque=0x7f4c5516eae0, irq=16, level=1) kvm_ioapic_set_irq(opaque=0x7f4c5516eae0, irq=16, level=0) kvm_ioapic_set_irq(opaque=0x7f4c5516eae0, irq=16, level=1) ... (and so on, with irq 16, alternating levels between 0 and 1). With the kernel irqlevel patch, Fedora looks identical. OS X (which now works), looks like this: kvm_ioapic_set_irq(opaque=0x7f6d27baad10, irq=19, level=1) kvm_ioapic_set_irq(opaque=0x7f6d27baad10, irq=19, level=0) kvm_ioapic_set_irq(opaque=0x7f6d27baad10, irq=19, level=1) kvm_ioapic_set_irq(opaque=0x7f6d27baad10, irq=16, level=1) kvm_ioapic_set_irq(opaque=0x7f6d27baad10, irq=19, level=0) kvm_ioapic_set_irq(opaque=0x7f6d27baad10, irq=16, level=0) kvm_ioapic_set_irq(opaque=0x7f6d27baad10, irq=19, level=1) kvm_ioapic_set_irq(opaque=0x7f6d27baad10, irq=19, level=0) kvm_ioapic_set_irq(opaque=0x7f6d27baad10, irq=19, level=1) kvm_ioapic_set_irq(opaque=0x7f6d27baad10, irq=19, level=0) kvm_ioapic_set_irq(opaque=0x7f6d27baad10, irq=16, level=1) kvm_ioapic_set_irq(opaque=0x7f6d27baad10, irq=16, level=0) kvm_ioapic_set_irq(opaque=0x7f6d27baad10, irq=16, level=1) ... (again, alternating levels and irq-16 only from here on out). I'm not sure how useful this is, or what info from which other kvm/ioapic method I could log during guest boot... --G