]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
exec: Include 'cpu.h' before validating CPUArchState placement
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 5 Dec 2023 22:24:03 +0000 (23:24 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 26 Apr 2024 13:28:11 +0000 (15:28 +0200)
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é <philmd@linaro.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Message-Id: <20231211212003.21686-2-philmd@linaro.org>

include/exec/cpu-all.h

index 1a6510fd3bfa390e2e9aea894fbea74955a3733d..b86209fc4924784a6b9ba233a660d645ceb083a6 100644 (file)
@@ -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));