From 3c58ddc9d784cd65af3d5810d9d66e57900e280a Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 11 Jul 2025 17:32:37 -0600 Subject: include/hw/core/cpu: Introduce cpu_tlb_fast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Encapsulate access to cpu->neg.tlb.f[] in a function. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/hw/core/cpu.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/hw/core/cpu.h') diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 8dd83f7457..22a78c9ee1 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -602,6 +602,13 @@ static inline CPUArchState *cpu_env(CPUState *cpu) return (CPUArchState *)(cpu + 1); } +#ifdef CONFIG_TCG +static inline CPUTLBDescFast *cpu_tlb_fast(CPUState *cpu, int mmu_idx) +{ + return &cpu->neg.tlb.f[mmu_idx]; +} +#endif + typedef QTAILQ_HEAD(CPUTailQ, CPUState) CPUTailQ; extern CPUTailQ cpus_queue; -- cgit 1.4.1