From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYXvp-0002AJ-7v for qemu-devel@nongnu.org; Thu, 19 Mar 2015 06:44:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYXvm-0006LM-J2 for qemu-devel@nongnu.org; Thu, 19 Mar 2015 06:44:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYXvm-0006L6-Cf for qemu-devel@nongnu.org; Thu, 19 Mar 2015 06:44:02 -0400 Message-ID: <550AA858.3060005@redhat.com> Date: Thu, 19 Mar 2015 11:43:36 +0100 From: Laszlo Ersek MIME-Version: 1.0 References: <1426515305-17766-1-git-send-email-somlo@cmu.edu> <1426515305-17766-6-git-send-email-somlo@cmu.edu> <55080FD4.4020406@redhat.com> <1426592990.27188.92.camel@nilsson.home.kraxel.org> <20150318200619.GL1832@HEDWIG.INI.CMU.EDU> In-Reply-To: <20150318200619.GL1832@HEDWIG.INI.CMU.EDU> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/6] fw_cfg: insert fw_cfg file blobs via qemu cmdline List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Gabriel L. Somlo" Cc: matt.fleming@intel.com, mdroth@linux.vnet.ibm.com, rjones@redhat.com, jordan.l.justen@intel.com, "Gabriel L. Somlo" , gleb@cloudius-systems.com, qemu-devel@nongnu.org, Gerd Hoffmann , pbonzini@redhat.com, Markus Armbruster On 03/18/15 21:06, Gabriel L. Somlo wrote: > On Tue, Mar 17, 2015 at 12:49:50PM +0100, Gerd Hoffmann wrote: [snip] >> Which reminds me: Going for QemuOpts would be very useful (gives >> -readconfig support), and it would solve the init order issue too. >> Instead of having your custom storage you just let QemuOpts parse and >> store the command line switch, then process them after fw_cfg device >> initialization. [snip] > So basically, you're saying "don't process 'opts' here with qemu_opt_get(), > just stash them as is, then process them later" ? (e.g. during > fw_cfg_options_insert() below) ? > > Is there an existing example where that's currently done that I use > for inspiration? > > Laszlo's suggestion was almost the opposite of this, i.e. allocate > memory for all the blobs during option processing, them just call > fw_cfg_add_file() during fw_cfg_options_insert(). I was wrong, simply. :) I forgot about -readconfig completely. (I do recall that I had been annoyed earlier by some option not working as expected with -readconfig; perhaps -smp? Not sure.) Meta: You should always take my qemu reviews with a grain of salt. They're mostly good for pulling in reviewers who know what they're doing. ;) I reviewed your v1 quickly for two reasons: - I didn't want you to regress fw_cfg accidentally, especially code I wrote, or code UEFI depends on. - I'm a nice person (lol) and wanted to get the review gears rolling for you (see above). Cheers, Laszlo