From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MxHuH-0006sR-GZ for qemu-devel@nongnu.org; Mon, 12 Oct 2009 06:13:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MxHuC-0006pJ-UY for qemu-devel@nongnu.org; Mon, 12 Oct 2009 06:13:32 -0400 Received: from [199.232.76.173] (port=34949 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxHuC-0006pA-4f for qemu-devel@nongnu.org; Mon, 12 Oct 2009 06:13:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49468) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MxHuB-0006Rb-Oq for qemu-devel@nongnu.org; Mon, 12 Oct 2009 06:13:28 -0400 Message-ID: <4AD30136.3000506@redhat.com> Date: Mon, 12 Oct 2009 12:13:10 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC PATCH v2 5/5] ne2k_isa: add property for option rom loading. References: <1254918996-26050-1-git-send-email-kraxel@redhat.com> <1254918996-26050-6-git-send-email-kraxel@redhat.com> <4ACC92C8.8060700@codemonkey.ws> <4ACC95D3.6070305@redhat.com> <4ACC9765.3030300@codemonkey.ws> <4ACC9EF9.1010201@redhat.com> <4ACCA2FC.6010002@codemonkey.ws> <4ACCA55A.1020602@redhat.com> <4ACCDF44.9010704@codemonkey.ws> In-Reply-To: <4ACCDF44.9010704@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org >>>> It's pc-specific though, so when we go the route of loading roms >>>> unconditionally we need to wrap that into a machine-specific helper >>>> function so it happes on TARGET_I386 only. >>> >>> No, it's not pc-specific. An e1000 card on a PPC still has an x86 option >>> rom. Whether it gets loaded and how it gets loaded depends on the >>> target, but not the existence of the rom on the device. >> >> Yep, the *loading* is what I was referring to (see $subject) ... > > Well, I guess I'm confused about where we stand. loading the rom is x86 specific ... > Are you suggesting that we drop the pxe property and load the roms > unconditionally? Yes, I think we should do that (on x86), given BEV works nicely. The e1000 rom needs fixing first of course ;) > The tricky thing here is that we only want to load a > particular rom once. There's no need to load the rtl8139 multiple times > for multiple nics. As hw/loader.c keeps track of the roms this should be easy to do. The rom_add_option() macro in hw/loader.h should become a function which loads the rom on x86 and does nothing on other archs. Then the nic drivers can simply call rom_add_option("pxe-${driver}.bin") unconditionally. cheers, Gerd