]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/loongarch/virt: Align VIRT_GED_CPUHP_ADDR to 4 bytes
authorHuacai Chen <chenhuacai@loongson.cn>
Tue, 23 Sep 2025 14:35:41 +0000 (22:35 +0800)
committerSong Gao <gaosong@loongson.cn>
Thu, 9 Oct 2025 11:08:30 +0000 (19:08 +0800)
commitdd333bf0e3ab2096702844ae0d0cff8a8864e5f7
treecf805e7297b8b976fa5a751db5f4c6888221476b
parentcdcb1d39eb72410bee55b6d3344f176c86224447
hw/loongarch/virt: Align VIRT_GED_CPUHP_ADDR to 4 bytes

Now VIRT_GED_CPUHP_ADDR is not aligned to 4 bytes, but if Linux kernel
is built with ACPI_MISALIGNMENT_NOT_SUPPORTED, it assumes the alignment,
otherwise we get ACPI errors at boot phase:

ACPI Error: AE_AML_ALIGNMENT, Returned by Handler for [SystemMemory] (20250404/evregion-301)
ACPI Error: Aborting method \_SB.CPUS.CSTA due to previous error (AE_AML_ALIGNMENT) (20250404/psparse-529)
ACPI Error: Aborting method \_SB.CPUS.C000._STA due to previous error (AE_AML_ALIGNMENT) (20250404/psparse-529)
ACPI Error: Method execution failed \_SB.CPUS.C000._STA due to previous error (AE_AML_ALIGNMENT) (20250404/uteval-68)

VIRT_GED_MEM_ADDR and VIRT_GED_REG_ADDR are already aligned now, but use
QEMU_ALIGN_UP() to explicitly align them can make code more robust.

Reported-by: Nathan Chancellor <nathan@kernel.org>
Suggested-by: WANG Rui <wangrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Message-ID: <20250923143542.2391576-3-chenhuacai@kernel.org>
Signed-off-by: Song Gao <gaosong@loongson.cn>
include/hw/loongarch/virt.h