On 7/6/23 04:49, Suravee Suthikulpanit wrote: "Refactor logic to set SMBIOS defaults"
Into a helper function pc_machine_init_smbios() in preparation for subsequent code to upgrade default SMBIOS entry point type. Then, call the helper function from the pc_machine_initfn() to eliminate duplicate code in pc_q35.c and pc_pixx.c. However, this changes the ordering of when the smbios_set_defaults() is called to before pc_machine_set_smbios_ep() (i.e. before handling the user specified QEMU option "-M ...,smbios-entry-point-type=[32|64]" to override the default type.) Therefore, also call the helper function in pc_machine_set_smbios_ep() to update the defaults. There is no functional change. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com> --- hw/i386/pc.c | 24 +++++++++++++++++++++++- hw/i386/pc_piix.c | 9 --------- hw/i386/pc_q35.c | 8 -------- 3 files changed, 23 insertions(+), 18 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>