From: Philippe Mathieu-Daudé Date: Tue, 5 Dec 2023 22:24:03 +0000 (+0100) Subject: exec: Include 'cpu.h' before validating CPUArchState placement X-Git-Tag: v9.1.0-rc0~133^2~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8501048b501aec0d2d422aafd713348c235d8b83;p=thirdparty%2Fqemu.git exec: Include 'cpu.h' before validating CPUArchState placement CPUArchState 'env' field is defined within the ArchCPU structure, so we need to include each target "cpu.h" header which defines it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Warner Losh Message-Id: <20231211212003.21686-2-philmd@linaro.org> --- diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 1a6510fd3bf..b86209fc492 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -391,6 +391,7 @@ static inline bool tlb_hit(uint64_t tlb_addr, vaddr addr) #endif /* !CONFIG_USER_ONLY */ /* Validate correct placement of CPUArchState. */ +#include "cpu.h" QEMU_BUILD_BUG_ON(offsetof(ArchCPU, parent_obj) != 0); QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) != sizeof(CPUState));