From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vfo6u-0006vz-8k for qemu-devel@nongnu.org; Mon, 11 Nov 2013 04:48:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vfo6l-0000G3-Rj for qemu-devel@nongnu.org; Mon, 11 Nov 2013 04:48:44 -0500 Received: from mail-ee0-x234.google.com ([2a00:1450:4013:c00::234]:41893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vfo6l-0000Fo-Kw for qemu-devel@nongnu.org; Mon, 11 Nov 2013 04:48:35 -0500 Received: by mail-ee0-f52.google.com with SMTP id l10so579169eei.25 for ; Mon, 11 Nov 2013 01:48:34 -0800 (PST) Date: Mon, 11 Nov 2013 10:48:31 +0100 From: Stefan Hajnoczi Message-ID: <20131111094831.GG28264@stefanha-thinkpad.redhat.com> References: <20131031150651.GI9423@HEDWIG.INI.CMU.EDU> <20131107180440.GC13775@HEDWIG.INI.CMU.EDU> <527BE9EF.50906@redhat.com> <20131107202842.GD13775@HEDWIG.INI.CMU.EDU> <20131108133925.GA5662@stefanha-thinkpad.redhat.com> <20131108155208.GE13775@HEDWIG.INI.CMU.EDU> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131108155208.GE13775@HEDWIG.INI.CMU.EDU> Subject: Re: [Qemu-devel] [PATCH v2] e1000: initial link negotiation on mac osx List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Gabriel L. Somlo" Cc: "pbonzini@redhat.com" , Alexander Graf , "jaceksburghardt@gmail.com" , "qemu-devel@nongnu.org" On Fri, Nov 08, 2013 at 10:52:09AM -0500, Gabriel L. Somlo wrote: > On Fri, Nov 08, 2013 at 02:39:25PM +0100, Stefan Hajnoczi wrote: > > On Fri, Nov 08, 2013 at 12:12:52AM +0100, Alexander Graf wrote: > >> We can easily modify SeaBIOS to just loop through all PCI devices, > >> look for an e1000 and initialize it far enough for XNU, no? > >> After all, it sounds like that's closer to the way a real Mac works. > > > > I'd much prefer Alex's suggestion so we avoid putting guest-specific > > hacks into QEMU. > > > > If there is really no better solution, please make an "extra" behavior > > disabled by default and accessible through a device property. For > > example -device e1000,xnu-preinit-hack=on. > > I agree too, in principle. OTOH I'm a bit worried that teaching SeaBIOS > about e1000, and then getting that change upstreamed there might be > a whole different size of problem to solve :) > > I will however give that a shot first, and fall back to > "xnu-preinit-hack=on" only if that doesn't work out... The other approach is to look at iPXE, the PXE boot ROM that QEMU ships for the e1000 NIC. It has an e1000 driver and you might find a hack to get things working: Either see if you can chainload the bootloader on the harddisk after having initialized the e1000 in iPXE. (Start a network boot but then use the 'boot' or 'chain' commands in iPXE.) Or consider adding code to pre-initialize the e1000 to iPXE. Whether that hack will be accepted by the iPXE community is a different question but this still pushes the hack into the guest firmware - closer to where it lives on the real hardware. Stefan