[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/47] accel/tcg: Validate placement of CPUNegativeOffsetState
From: |
Richard Henderson |
Subject: |
[PULL 13/47] accel/tcg: Validate placement of CPUNegativeOffsetState |
Date: |
Tue, 3 Oct 2023 10:30:18 -0700 |
Verify that the distance between CPUNegativeOffsetState and
CPUArchState is no greater than any alignment requirements.
Reviewed-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/exec/cpu-all.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 230525ebf7..ed7747a5f1 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -457,6 +457,12 @@ static inline CPUState *env_cpu(CPUArchState *env)
return &env_archcpu(env)->parent_obj;
}
+/*
+ * Validate placement of CPUNegativeOffsetState.
+ */
+QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) - offsetof(ArchCPU, neg) >=
+ sizeof(CPUNegativeOffsetState) + __alignof(CPUArchState));
+
/**
* env_neg(env)
* @env: The architecture environment
--
2.34.1
- [PULL 12/47] target/*: Add instance_align to all cpu base classes, (continued)
- [PULL 12/47] target/*: Add instance_align to all cpu base classes, Richard Henderson, 2023/10/03
- [PULL 06/47] accel/tcg: Have tcg_exec_realizefn() return a boolean, Richard Henderson, 2023/10/03
- [PULL 09/47] accel/tcg: Move CPUTLB definitions from cpu-defs.h, Richard Henderson, 2023/10/03
- [PULL 08/47] target/arm: Replace TARGET_PAGE_ENTRY_EXTRA, Richard Henderson, 2023/10/03
- [PULL 14/47] accel/tcg: Move CPUNegativeOffsetState into CPUState, Richard Henderson, 2023/10/03
- [PULL 20/47] accel/tcg: Remove cpu_set_cpustate_pointers, Richard Henderson, 2023/10/03
- [PULL 22/47] tcg: Remove TCGContext.tlb_fast_offset, Richard Henderson, 2023/10/03
- [PULL 26/47] accel/tcg: Modify atomic_mmu_lookup() to use CPUState, Richard Henderson, 2023/10/03
- [PULL 25/47] accel/tcg: Modify memory access functions to use CPUState, Richard Henderson, 2023/10/03
- [PULL 32/47] exec: Move cpu_loop_foo() target agnostic functions to 'cpu-common.h', Richard Henderson, 2023/10/03
- [PULL 13/47] accel/tcg: Validate placement of CPUNegativeOffsetState,
Richard Henderson <=
- [PULL 29/47] accel/tcg: Unify user and softmmu do_[st|ld]*_mmu(), Richard Henderson, 2023/10/03
- [PULL 15/47] accel/tcg: Remove CPUState.icount_decr_ptr, Richard Henderson, 2023/10/03
- [PULL 17/47] accel/tcg: Remove cpu_neg(), Richard Henderson, 2023/10/03
- [PULL 11/47] target/arm: Remove size and alignment for cpu subclasses, Richard Henderson, 2023/10/03
- [PULL 07/47] accel/tcg: Restrict tcg_exec_[un]realizefn() to TCG, Richard Henderson, 2023/10/03
- [PULL 16/47] accel/tcg: Move can_do_io to CPUNegativeOffsetState, Richard Henderson, 2023/10/03
- [PULL 21/47] accel/tcg: Remove env_neg(), Richard Henderson, 2023/10/03
- [PULL 24/47] accel/tcg: Modify probe_access_internal() to use CPUState, Richard Henderson, 2023/10/03
- [PULL 19/47] accel/tcg: Replace CPUState.env_ptr with cpu_env(), Richard Henderson, 2023/10/03
- [PULL 18/47] tcg: Rename cpu_env to tcg_env, Richard Henderson, 2023/10/03