From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlERm-0005WU-1s for qemu-devel@nongnu.org; Thu, 12 Jan 2012 01:47:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlERk-000335-US for qemu-devel@nongnu.org; Thu, 12 Jan 2012 01:47:38 -0500 Received: from chello084112167138.7.11.vie.surfer.at ([84.112.167.138]:54408 helo=wiesinger.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlERk-00030P-BS for qemu-devel@nongnu.org; Thu, 12 Jan 2012 01:47:36 -0500 Date: Thu, 12 Jan 2012 07:45:29 +0100 (CET) From: Gerhard Wiesinger In-Reply-To: <4F0AB023.5040705@redhat.com> Message-ID: References: <4F0AB023.5040705@redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: [Qemu-devel] [PATCH] network: Added option to disable NIC option roms List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Kevin O'Connor , qemu-devel@nongnu.org, Gleb Natapov On Mon, 9 Jan 2012, Gerd Hoffmann wrote: > Hi, > >> if (!pci_dev->qdev.hotplugged) { >> static int loaded = 0; >> - if (!loaded) { >> + if (!loaded && >> pci_has_not_explicitly_disabled_option_romfile(pci_dev)) { >> rom_add_option("pxe-ne2k_pci.rom", -1); >> loaded = 1; >> } > > I think you can just remove this altogether and add a .romfile = "..." > entry instead like it is done for the other nics. I'm not sure about the consequences (hotplugging feature, etc.) when changing it to romfile as in other PCI devices. Also the patch is more generic and supports static and dynamic devices (hotplugable and possible future devices). Patch supports without hotplugging both options to disable the romfile: ,romfile= ,romfile=disabled And the patch has already been tested ... Therefore I suggest to commit it and maybe make a refactoring without hotplugging later on. Ciao, Gerhard -- http://www.wiesinger.com/