On 7/30/25 2:12 PM, Pierrick Bouvier wrote:
On 7/30/25 2:10 PM, Pierrick Bouvier wrote:
On 7/27/25 1:02 AM, Richard Henderson wrote:
In an effort to keep all ARMMMUIdx data in one place, begin construction
of an info table describing all of the properties of the mmu_idx.  Begin
with the access EL.

Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
    target/arm/internals.h       |  3 +--
    target/arm/mmuidx-internal.h | 27 ++++++++++++++++++++++++
    target/arm/helper.c          | 27 ------------------------
    target/arm/mmuidx.c          | 41 ++++++++++++++++++++++++++++++++++++
    target/arm/meson.build       |  7 +++++-
    5 files changed, 75 insertions(+), 30 deletions(-)
    create mode 100644 target/arm/mmuidx-internal.h
    create mode 100644 target/arm/mmuidx.c

What's the benefit to explicitely size arm_mmuidx_table on declaration
and definition?


I missed the:
tcg_debug_assert((unsigned)idx < ARRAY_SIZE(arm_mmuidx_table)), which
does not see definition of the table.

Maybe it would be easier to declare size in the header, and reuse it on
both sides (declaration, definition instead of ARM_MMU_IDX_M + 8).


Finally, the ARM_MMU_IDX_M + 8 is not a problem.
That said, given how much we repeat
(unsigned)idx < ARRAY_SIZE(arm_mmuidx_table),
it's definitely worth having a 'arm_mmuidx_is_valid' static inline function for that.

Reviewed-by: Pierrick Bouvier <pierrick.bouv...@linaro.org>




Reply via email to