smbios: don't check type4 structures in legacy mode
commit9cd7fd69cfad9180e22b9adb728fc7b596b4bc1e
authorIgor Mammedov <imammedo@redhat.com>
Thu, 14 Mar 2024 15:22:49 +0000 (14 16:22 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 18 Mar 2024 12:42:45 +0000 (18 08:42 -0400)
tree114f5154209f52b80739ef73961f9d6ecf703665
parentcba59fe38a2bc2b1888892539d0c4688e07aa356
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>
hw/i386/fw_cfg.c
hw/smbios/smbios.c
include/hw/firmware/smbios.h