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