[SeaBIOS] [Qemu-devel] [QEMU v6 PATCH 00/17] SMBIOS: build full tables in QEMU

Markus Armbruster armbru at redhat.com
Tue Apr 22 18:16:53 CEST 2014


Gerd Hoffmann <kraxel at redhat.com> writes:

> 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?

I don't like this technique, because it tends to degrade error messages.
When you're processing the option, your error messages come out with
nice location information automatically.  If you just store filenames,
that's lost.  To preserve it, you need to do extra work.

Note that smbios.c already stores the -smbios type=... for later use by
smbios_get_table()'s table building.  Could you store the blob, too?

[...]



More information about the SeaBIOS mailing list