qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [QEMU v6 PATCH 00/17] SMBIOS: build full tables in QEMU
Date: Wed, 16 Apr 2014 08:41:51 +0200

  Hi,

> Add "void smbios_get_tables()" as a separate function to generate the
> entry point and aggregate smbios table, and then:
> 
>    if "machine_type < 2.1" then
> 
>       insert smbios_get_table() into fw_cfg (compat mode)
> 
>    else
> 
>       insert smbios_get_tables() blob + entry point (new hotness)
> 
>    fi

I mean this:

      insert smbios_get_table() into fw_cfg (compat mode)
      if (machine_type >= 2.1)
          insert smbios_get_tables() blob + entry point (new hotness)

But maybe your variant is better as it encourages the move to the new
interfaces on the firmware side.  And if we merge it early in the 2.1
cycle there is quite some time for the firmware to sort things.

> I guess both compat and new smbios_get_table[s] can use the same
> default fields set via the command line.

Yes.

> The remaining issue is how to handle "-smbios file=<foo>" blobs; maybe
> smbios_set_defaults() can be used to set the version, and then the
> command line parser (smbios_entry_add()) would know which kind of table
> to insert the blob into, compat or aggregate ?
> 
> That being said, how do I even tell the difference between pre- and
> post- 2.1 machine types ? Would that be in pc.c, or pc_[q35|piix].c ?

Global variable, simliar to smbios_type1_defaults.  machine type init
code will set it accordingly.  smbios code just does "if
(smbios_generate_tables) { ... }" (or however we name this).

cheers,
  Gerd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]