Currently, pc-q35 and pc-i44fx machine models are default to use SMBIOS 2.8
(32-bit entry point). Since SMBIOS 3.0 (64-bit entry point) is now fully
supported since QEMU 7.0, default to use SMBIOS 3.0 for newer machine
models. This is necessary to avoid the following message when launching
a VM with large number of vcpus.
"SMBIOS 2.1 table length 66822 exceeds 65535"
Note that user can still override the entry point tyme w/ QEMU option
"-M ..., smbios-entry-point-type=[32|64].
Signed-off-by: Suravee Suthikulpanit<suravee.suthikulpanit@amd.com>
---
hw/i386/pc.c | 14 +++++++++++++-
hw/i386/pc_piix.c | 5 +++++
hw/i386/pc_q35.c | 5 +++++
include/hw/i386/pc.h | 2 ++
4 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 8fc34f5454..5a87b82185 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -786,6 +786,14 @@ void pc_machine_done(Notifier *notifier, void *data)
if (pcmc->smbios_defaults) {
MachineClass *mc = MACHINE_GET_CLASS(pcms);
+ /*
+ * Check if user has specified a command line option
+ * to override the SMBIOS default entry point type.
+ */
+ if (!pcms->smbios_use_cmdline_ep_type) {
+ pcms->smbios_entry_point_type = pcmc->default_smbios_ep_type;
+ }