From 269bd5d8f61c6b0825ed3c6a5fe01a3ad71c3b4a Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 22 Mar 2019 22:03:39 -0700 Subject: cpu: Move the softmmu tlb to CPUNegativeOffsetState We have for some time had code within the tcg backends to handle large positive offsets from env. This move makes sure that need not happen. Indeed, we are able to assert at build time that simple offsets suffice for all hosts. Reviewed-by: Alistair Francis Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/exec/cpu-all.h') diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 253dd1d..f4fed7d 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -429,4 +429,15 @@ static inline CPUNegativeOffsetState *cpu_neg(CPUState *cpu) return &arch_cpu->neg; } +/** + * env_tlb(env) + * @env: The architecture environment + * + * Return the CPUTLB state associated with the environment. + */ +static inline CPUTLB *env_tlb(CPUArchState *env) +{ + return &env_neg(env)->tlb; +} + #endif /* CPU_ALL_H */ -- cgit v1.1