From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1NPL-00010P-G7 for qemu-devel@nongnu.org; Thu, 09 Jan 2014 16:45:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1NPD-0001Du-Na for qemu-devel@nongnu.org; Thu, 09 Jan 2014 16:44:55 -0500 Received: from mail-qe0-x234.google.com ([2607:f8b0:400d:c02::234]:65389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1NPD-0001Db-Is for qemu-devel@nongnu.org; Thu, 09 Jan 2014 16:44:47 -0500 Received: by mail-qe0-f52.google.com with SMTP id ne12so3648424qeb.11 for ; Thu, 09 Jan 2014 13:44:46 -0800 (PST) Date: Thu, 9 Jan 2014 16:44:37 -0500 From: "Gabriel L. Somlo" Message-ID: <20140109214436.GB1276@ERROL.INI.CMU.EDU> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52CF02A6.8000007@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: qemu-devel@nongnu.org, imammedo@redhat.com, lersek@redhat.com, agraf@suse.de, "Michael S. Tsirkin" Hi Paolo, On Thu, Jan 09, 2014 at 09:12:22PM +0100, Paolo Bonzini wrote: > See > http://lists.nongnu.org/archive/html/qemu-devel/2013-11/msg02815.html > for some ideas. I remember saving that email for a closer examination after I took care of the AppleSMC patch, and then I forgot all about it -- thanks for the reminder !!! Of the things you mentioned there: > The IRQNoFlags(){2,8} setting makes sense if the general configuration > register of the HPET has bits 0..1=1 (HPET enabled = 1 and HPET legacy > replacement route = 1). > > ... > > Method(_CRS, 0) { > Store(GCNF, Local0) > If (LEqual(LAnd(Local0, 3), 3)) { // Legacy replacement route > ConcatenateResTemplate(RESP, RESI, Local1) This made no difference. XP worked on piix with up and smp, and OS X worked everywhere *except* on piix+smp, where it crashed with an HPET panic. > (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. > (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). 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... Maybe there's some deeper, subtler ACPI "mismatch" we're triggering here... Thanks, --Gabriel