From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vvtx6-0005sP-Ea for qemu-devel@nongnu.org; Wed, 25 Dec 2013 14:17:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vvtx0-00054w-EV for qemu-devel@nongnu.org; Wed, 25 Dec 2013 14:17:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vvtx0-00053B-6d for qemu-devel@nongnu.org; Wed, 25 Dec 2013 14:17:02 -0500 Date: Wed, 25 Dec 2013 21:20:55 +0200 From: "Michael S. Tsirkin" Message-ID: <20131225192055.GC22071@redhat.com> References: <20131222153455.GB15876@ERROL.INI.CMU.EDU> <52B70C42.60707@redhat.com> <20131222171443.GC15876@ERROL.INI.CMU.EDU> <52B765CC.2010800@redhat.com> <20131223031935.GA27758@crash.ini.cmu.edu> <9FCC1927-2414-41D4-887A-D3DBF46D25B5@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9FCC1927-2414-41D4-887A-D3DBF46D25B5@suse.de> Subject: Re: [Qemu-devel] [PATCH v3] Add DSDT node for AppleSMC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: "pbonzini@redhat.com" , "Gabriel L. Somlo" , Laszlo Ersek , "qemu-devel@nongnu.org" , "imammedo@redhat.com" On Wed, Dec 25, 2013 at 08:11:56PM +0100, Alexander Graf wrote: > > > > Am 23.12.2013 um 04:19 schrieb "Gabriel L. Somlo" : > > > > On Sun, Dec 22, 2013 at 11:21:00PM +0100, Laszlo Ersek wrote: > >>> 2. Use "IRQNoFlags() { 5 }" with the SMC (or any other > >>> number that isn't already allocated. > >> > >> I don't think there's anything left free: > >> ... > >> > >> I guess the "by the book" solution would be to really stop the FDC from > >> being emulated when the AppleSMC is present, but I mention that idea > >> only because I like to waste bandwidth. > >> > >> Option 1 ("Do nothing") sounds appropriate to me. > > > > So making the FDC optional (or at least allowing it to be left out) > > sounds like it could be a fun project I could play with later (unless > > anyone else beats me to it), but it would be nice if it didn't end up > > a hard precondition for getting the SMC ACPI patch accepted :) > > > > Once we can turn off the FDC, we can make it and the SMC mutually > > exclusive and/or throw an error if both are enabled. > > > > In reality (and Alex, please correct me if I'm wrong), the emulated > > SMC will never generate an INT#6, unlike the real hardware chip. The > > emulated SMC is just there to say "Yeah, boss, sure, let me get right > > on that for you!" to OS X, to calm it down and make it think everything > > is right with its little universe :) The real chip might trigger an > > interrupt if something's getting too hot, or a fan stopped spinning > > when it shouldn't have, but that's never going to happen on a VM guest. > > Its main purpose is to signal you dropping your notebook, so the system can shut down your hard drive. > > The main issue I can see with the irq line is that we now potentially have two edge triggered irq sources on a single line, so an OS may get confused. > > But I agree, let's get that one solved later. > > > > > OS X doesn't even assume the presence of an FDC, and any guest OS > > which expects an FDC will never get unexpected conflicting interrupts > > from the emulated SMC, should the latter be enabled, accidentally or > > not. So in practice the risk for any trouble should be about zero... > > It may assign the irq line to the applesmc driver, killing the fdc's functionality. > > Speaking of which, does the q35 even have an fdc? > > > Alex I don't think it does but this device seems to be supported with piix as well - or is this by mistake? > > > > Thanks for helping me think this stuff through ! > > --Gabriel