diff options
| author | Igor Mammedov <imammedo@redhat.com> | 2024-03-14 16:22:49 +0100 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2024-03-18 08:42:45 -0400 |
| commit | 9cd7fd69cfad9180e22b9adb728fc7b596b4bc1e (patch) | |
| tree | 114f5154209f52b80739ef73961f9d6ecf703665 /hw/i386/fw_cfg.c | |
| parent | cba59fe38a2bc2b1888892539d0c4688e07aa356 (diff) | |
| download | focaccia-qemu-9cd7fd69cfad9180e22b9adb728fc7b596b4bc1e.tar.gz focaccia-qemu-9cd7fd69cfad9180e22b9adb728fc7b596b4bc1e.zip | |
smbios: don't check type4 structures in legacy mode
legacy mode doesn't support structures of type 2 and more, and CLI has a check for '-smbios type' option, however it's still possible to sneak in type4 as a blob with '-smbios file' option. However doing the later makes SMBIOS tables broken since SeaBIOS doesn't expect that. Rather than trying to add support for type4 to legacy code (both QEMU and SeaBIOS), simplify smbios_get_table_legacy() by dropping not relevant check in legacy code and error out on type4 blob. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Ani Sinha <anisinha@redhat.com> Tested-by: Fiona Ebner <f.ebner@proxmox.com> Message-Id: <20240314152302.2324164-9-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/fw_cfg.c')
| -rw-r--r-- | hw/i386/fw_cfg.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index c1e9c0fd9c..d1281066f4 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -71,8 +71,7 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg) smbios_set_cpuid(cpu->env.cpuid_version, cpu->env.features[FEAT_1_EDX]); if (pcmc->smbios_legacy_mode) { - smbios_tables = smbios_get_table_legacy(ms->smp.cpus, - &smbios_tables_len); + smbios_tables = smbios_get_table_legacy(&smbios_tables_len); fw_cfg_add_bytes(fw_cfg, FW_CFG_SMBIOS_ENTRIES, smbios_tables, smbios_tables_len); return; |