On Di, 2014-04-22 at 09:01 -0400, Gabriel L. Somlo wrote: > On Tue, Apr 22, 2014 at 08:42:29AM +0200, Gerd Hoffmann wrote: > > acpi is pretty much in the same boat ... > > > > /me looks ... > > > > Ah, there is a notifier where you (hopefully) can hook in easily: > > pc_guest_info_machine_done (see hw/i386/pc.c). > > Not sure this can help me though. The order in which things happen is: > > 1. smbios_entry_add() gets called for every "-smbios file=..." and > "-smbios type=..." command line argument > > a. "type=..." is OK, we just remember the values for later > > b. "file=..." less so, because we have to load the blobs into > *something*.
Remember the filenames for later ... > In my v7 patch set I decided to load the blobs > into *both* the legacy and new-fangled aggregate tables. > > 2. smbios_set_defaults() is called > > - by now we *already* know the machine version we have, so > we get to free the table we now know we won't need > (aggregate if we're on <= v2.0, legacy if 2.1 or newer, > see 1.b. above) ... and load the blobs here? > 3. smbios_get_table* functions are called and the various resulting > blobs are inserted into fw_cfg. ... or here? > 4. pc_guest_info_machine_done() gets called after all of the above. > > - placing a callback here is unlikely to be helpful, unless > I'm missing something. Indeed. /me was looking for a place surely late enough in init order. I think acpi needs this because there are also dependencies on devices added via -device, so doing acpi_setup in QEMUMachine->init() doesn't work. For smbios it doesn't make a difference whenever fw_cfg is filled in that notifier or in QEMUMachine->init(). cheers, Gerd