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é <philmd@linaro.org> Reviewed-by: Warner Losh <imp@bsdimp.com> Message-Id: <20231211212003.21686-2-philmd@linaro.org>
This commit is contained in:
parent
51579d40f9
commit
8501048b50
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user