From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W12io-0006GH-3Z for qemu-devel@nongnu.org; Wed, 08 Jan 2014 18:39:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W12if-00076m-Ma for qemu-devel@nongnu.org; Wed, 08 Jan 2014 18:39:38 -0500 Received: from mail-qc0-x22c.google.com ([2607:f8b0:400d:c01::22c]:37687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W12if-00076G-Hc for qemu-devel@nongnu.org; Wed, 08 Jan 2014 18:39:29 -0500 Received: by mail-qc0-f172.google.com with SMTP id c9so555031qcz.17 for ; Wed, 08 Jan 2014 15:39:29 -0800 (PST) Date: Wed, 8 Jan 2014 18:39:25 -0500 From: "Gabriel L. Somlo" Message-ID: <20140108233924.GA11234@foober.ini.cmu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52CDCDA2.4040206@redhat.com> Subject: Re: [Qemu-devel] [PATCH] Add option to disable FDC from ISA bus and ACPI on i386 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: imammedo@redhat.com, mst@redhat.com, lersek@redhat.com, qemu-devel@nongnu.org, agraf@suse.de On Wed, Jan 08, 2014 at 11:13:54PM +0100, Paolo Bonzini wrote: > Have you played with the HPET device? It would be nice to have Mac OS X > support in QEMU 2.0. I remember telling you that the HPET needed an extra ACPI patch (enclosed again below for reference) to work with OS X, and that this patch conflicts with XP. In the mean time, after some tinkering, it turns out that Q35 works fine without the patch. On PIIX, xnu crashes during boot with a "no HPET found" panic unless the patch is applied. At this point, I'm tempted to just write off PIIX + OS X and declare Q35 as the only "supported" machine type, to keep things simple and avoid complicating the HPET ACPI code with if/then/else logic that depends on the return value of SMC._STA(), etc. Let me know what you all think. Thanks, --Gabriel P.S. Another OS X issue is getting e1000 to "link up" (but in an earlier conversation it was decided that guest-specific hacks belong in the BIOS rather than in QEMU, so I still have a "todo" item to figure out where to put that patch, and how :) ############################################################################### # Modify DSDT entry for HPET: conditionally insert "IRQNoFlags() {2, 8}" into # _CRS method only if an AppleSMC chip is present and enabled (otherwise, this # will cause WinXP to BSOD). # NOTE: not needed with q35, but necessary on piix !!! ############################################################################### diff --git a/hw/i386/acpi-dsdt-hpet.dsl b/hw/i386/acpi-dsdt-hpet.dsl index dfde174..2a0158a 100644 --- a/hw/i386/acpi-dsdt-hpet.dsl +++ b/hw/i386/acpi-dsdt-hpet.dsl @@ -38,14 +38,23 @@ Scope(\_SB) { } Return (0x0F) } - Name(_CRS, ResourceTemplate() { -#if 0 /* This makes WinXP BSOD for not yet figured reasons. */ - IRQNoFlags() {2, 8} -#endif + Name(RESP, ResourceTemplate() { Memory32Fixed(ReadOnly, 0xFED00000, // Address Base 0x00000400, // Address Length ) }) + Name(RESI, ResourceTemplate() { + IRQNoFlags() {2, 8} + }) + Method(_CRS, 0) { + Store(\_SB.PCI0.ISA.SMC._STA, Local0) + If (LEqual(Local0, 0x0B)) { // AppleSMC present, add IRQ + ConcatenateResTemplate(RESP, RESI, Local1) + Return (Local1) + } else { + Return (RESP) + } + } } }