From a120d32097910edfc1612c604836582c3a4b83c6 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 29 Jan 2024 11:37:54 +1000 Subject: include/exec: Implement cpu_mmu_index generically MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For user-only mode, use MMU_USER_IDX. For system mode, use CPUClass.mmu_index. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/exec/cpu-all.h') diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 8501a33..80c0d06 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -311,6 +311,10 @@ CPUArchState *cpu_copy(CPUArchState *env); #define TLB_MMIO (1 << (TARGET_PAGE_BITS_MIN - 2)) #define TLB_WATCHPOINT 0 +static inline int cpu_mmu_index(CPUArchState *env, bool ifetch) +{ + return MMU_USER_IDX; +} #else /* -- cgit v1.1