qemu-cr16/hw/core
Igor Mammedov fa82ce2dde smbios: cap DIMM size to 2Tb as workaround for broken Windows
With current limit set to match max spec size (2PTb),
Windows fails to parse type 17 records when DIMM size reaches 4Tb+.
Failure happens in GetPhysicallyInstalledSystemMemory() function,
and fails "Check SMBIOS System Memory Tables" SVVP test.
Though not fatal, it might cause issues for userspace apps,
something like [1].

Lets cap default DIMM size to 2Tb for now, until MS fixes it.

1) https://issues.redhat.com/browse/RHEL-81999?focusedId=27731200&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-27731200

PS: It's obvious 32 int overflow math somewhere in Windows,
    MS admitted that it's Windows bug and in a process of fixing it.
    However it's unclear if W10 and earlier would get the fix.
    So however I dislike changing defaults, we heed to work around
    the issue (it looks like QEMU regression while not being it).
    Hopefully 2Tb/DIMM split will last longer until VM memory size
    will become large enough to cause to many type 17 records issue
    again.
PPS:
    Alternatively, instead of messing with defaults, we can create
    a dedicated knob to ask for desired DIMM size cap explicitly
    on CLI. That will let users to enable workaround when they
    hit this corner case. Downside is that knob has to be propagated
    up all mgmt stack, which might be not desirable.
PPPS:
    Yet alternatively, users can configure initial RAM to be less
    than 4Tb and all additional RAM add as DIMMs on QEMU CLI.
    (however it's the job to be done by mgmt which could know
    Windows version and total amount of RAM)

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Fixes: 62f182c97b ("smbios: make memory device size configurable per Machine")
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20250901084915.2607632-1-imammedo@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2025-10-05 09:01:08 -04:00
..
bus.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
clock-vmstate.c hw/core: Constify VMState 2023-12-29 11:17:30 +11:00
clock.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
cpu-common.c cpus: remove TCG-ism from cpu_exit() 2025-09-17 19:00:55 +02:00
cpu-system.c accel/tcg: Move post-load tb_flush to vm_change_state hook 2025-09-24 10:29:43 -07:00
cpu-user.c cpus: Remove CPUClass::has_work() handler 2025-03-09 17:00:47 +01:00
eif.c hw/core/eif: Use stateful qcrypto apis 2024-12-13 15:26:58 +01:00
eif.h hw/core: Add Enclave Image Format (EIF) related helpers 2024-10-31 18:28:32 +01:00
fw-path-provider.c
generic-loader.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
gpio.c qdev: Use machine_get_container() 2025-01-09 18:16:24 +01:00
guest-loader.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
guest-loader.h hw/core: implement a guest-loader to support static hypervisor guests 2021-03-10 15:34:11 +00:00
hotplug.c
irq.c hw/irq: New qemu_init_irq_child() function 2025-09-02 17:57:05 +02:00
Kconfig hw/core: Add Enclave Image Format (EIF) related helpers 2024-10-31 18:28:32 +01:00
loader-fit.c include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
loader.c linux-user: Move ppc uabi/asm/elf.h workaround to osdep.h 2025-08-28 06:39:25 +10:00
machine-hmp-cmds.c hw/core/machine: Display CPU model name in 'info cpus' command 2025-07-15 19:28:36 +02:00
machine-qmp-cmds.c Accelerators patches 2025-07-16 07:13:40 -04:00
machine-smp.c i386/cpu: add has_caches flag to check smp_cache configuration 2025-02-25 16:18:12 +01:00
machine.c smbios: cap DIMM size to 2Tb as workaround for broken Windows 2025-10-05 09:01:08 -04:00
meson.build meson: remove lib{system, user}_ss aliases 2025-05-26 17:31:06 +02:00
nmi.c hw/core: Improve error message when machine doesn't provide NMIs 2023-02-23 14:10:17 +01:00
null-machine.c include/system: Move exec/address-spaces.h to system/address-spaces.h 2025-04-23 14:08:21 -07:00
numa.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
or-irq.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
platform-bus.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
ptimer.c include/exec: Split out icount.h 2025-04-23 14:08:44 -07:00
qdev-clock.c clock: inline most of qdev_init_clocklist 2024-12-10 18:49:24 +01:00
qdev-fw.c
qdev-hotplug.c hw/qdev: Check machine_hotplug_handler in hotplug_unplug_allowed_common 2025-01-13 17:16:03 +01:00
qdev-prop-internal.h qdev: Make qdev_propinfo_get_uint16() static 2020-12-15 10:02:07 -05:00
qdev-properties-system.c hw/display: Allow injection of virtio-gpu EDID name 2025-07-15 10:22:33 +04:00
qdev-properties.c qdev-properties: Add DEFINE_PROP_ON_OFF_AUTO_BIT64() 2025-07-14 05:25:34 -04:00
qdev-user.c qdev: Implement qdev_create_fake_machine() for user emulation 2025-01-09 18:16:24 +01:00
qdev.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
register.c hw/core/register: Do not unparent in instance_finalize() 2025-09-24 09:23:20 +02:00
reset.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
resetcontainer.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
resettable.c hw/core/resettable: Remove transitional_function machinery 2024-09-13 15:31:46 +01:00
split-irq.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
stream.c hw/core/stream: Rename StreamSlave as StreamSink 2020-12-10 12:15:04 -05:00
sysbus-fdt.c target-arm queue: 2025-09-17 11:10:55 -07:00
sysbus.c hw/core/sysbus: Introduce sysbus_mmio_map_name() helper 2025-07-15 02:56:40 -04:00
trace-events trace-events: remove the remaining vcpu trace events 2023-06-01 11:05:05 -04:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
uboot_image.h license: Update deprecated SPDX tag GPL-2.0+ to GPL-2.0-or-later 2024-09-20 10:11:59 +03:00
vm-change-state-handler.c system/runstate: add VM state change cb with return value 2025-05-14 05:39:14 -04:00
vmstate-if.c vmstate: add qom interface to get id 2020-01-06 18:41:32 +04:00