From: Richard Henderson Date: Wed, 8 Oct 2025 21:55:15 +0000 (-0700) Subject: include/hw/core/cpu: Widen MMUIdxMap X-Git-Tag: v10.2.0-rc1~67^2~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1e2f08b431890c757e8dffc760c2719e9577f86;p=thirdparty%2Fqemu.git include/hw/core/cpu: Widen MMUIdxMap Widen MMUIdxMap to 32 bits. Do not yet expand NB_MMU_MODES, but widen the map type in preparation. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-id: 20251008215613.300150-16-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 7214d41cb5..3010dd4f5d 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -90,9 +90,6 @@ */ QEMU_BUILD_BUG_ON(sizeof(vaddr) > sizeof(run_on_cpu_data)); -/* We currently can't handle more than 16 bits in the MMUIDX bitmask. - */ -QEMU_BUILD_BUG_ON(NB_MMU_MODES > 16); #define ALL_MMUIDX_BITS ((1 << NB_MMU_MODES) - 1) static inline size_t tlb_n_entries(CPUTLBDescFast *fast) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 4f7026a119..d175edb6f8 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -201,7 +201,7 @@ struct CPUClass { * Fix the number of mmu modes to 16. */ #define NB_MMU_MODES 16 -typedef uint16_t MMUIdxMap; +typedef uint32_t MMUIdxMap; /* Use a fully associative victim tlb of 8 entries. */ #define CPU_VTLB_SIZE 8