From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1bL5-0002KC-Gh for qemu-devel@nongnu.org; Fri, 10 Jan 2014 07:37:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1bKy-0007q6-V7 for qemu-devel@nongnu.org; Fri, 10 Jan 2014 07:37:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:3315) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1bKy-0007pj-Mg for qemu-devel@nongnu.org; Fri, 10 Jan 2014 07:37:20 -0500 Message-ID: <52CFE97A.6010301@redhat.com> Date: Fri, 10 Jan 2014 13:37:14 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <52CDCDA2.4040206@redhat.com> <20140108233924.GA11234@foober.ini.cmu.edu> <20140109015117.GB19321@redhat.com> <20140109185144.GA1276@ERROL.INI.CMU.EDU> <52CF02A6.8000007@redhat.com> <20140109214436.GB1276@ERROL.INI.CMU.EDU> In-Reply-To: <20140109214436.GB1276@ERROL.INI.CMU.EDU> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: "Gabriel L. Somlo" Cc: qemu-devel@nongnu.org, imammedo@redhat.com, lersek@redhat.com, agraf@suse.de, "Michael S. Tsirkin" Il 09/01/2014 22:44, Gabriel L. Somlo ha scritto: >> (1) Does Mac OS work if you add a _PRS with IRQNoFlags and >> Memory32Fixed, but leave _CRS as it is? > > Nope, same exact behavior. > >> (2) does it work with -no-hpet? > > With "IRQNoFlags(){2, 8}" hardcoded in HPET._CRS, XP appears to work > great if -no-hpet is given. I guess _STA evaluates to 0, so nothing > else matters. And what about Mac OS X? >> (3) you could also make that dependent on _OSI("Darwin"). > > This works, for the same reason as querying SMC._STA (find something > "unique" about OS X and conditionally insert IRQNoFlags(){2, 8}) if > that "something" is detected.. > > So, we have two solutions that work: > > 1. hardcode "IRQNoFlags(){2, 8}" and require -no-hpet to prevent XP > from bluescreening. Basically, this means we don't support XP on > a VM where HPET is enabled. > > 2. conditionally insert "IRQNoFlags(){2, 8}" if _OSI("Darwin") returns > 0xFFFFFFFF, which is only necessary if we want to run OS X on piix+smp > (all other combinations of (piix vs. q35) x (up vs. smp) work fine > already). _OSI is bad, but (1) is worse. > I still don't get why on real hardware where the HPET has > "IRQNoFlags(){2, 8}" in its _CRS method XP seems to be OK... My laptop has this: Device (HPET) { Name (_HID, EisaId ("PNP0103")) // _HID: Hardware ID Method (_STA, 0, NotSerialized) // _STA: Status { If (LAnd (\WNTF, LNot (\WXPF))) { Return (0x00) } Else { Return (0x0F) } Return (0x00) } Name (BUF0, ResourceTemplate () { Memory32Fixed (ReadOnly, 0xFED00000, // Address Base 0x00000400, // Address Length _Y27) }) Method (_CRS, 0, Serialized) // _CRS: Current Resource Settings { CreateDWordField (BUF0, \_SB.PCI0.LPC.HPET._Y27._BAS, HPT0) // _BAS: Base Address Store (\HPET, HPT0) // HPET comes from a table that BIOS fills in reserved memory Return (BUF0) } } so no IRQs, and my workstation is similar. They are respectively from Lenovo and Fujitsu. Looks like an Apple quirk. Paolo