This started as just addressing #3005: raising the unaligned access fault for DC ZVA on pages with Device attribute. But then I saw that we weren't correctly ordering the permission fault for MTX, and that we could avoid multiple page table lookups.
While these are bugs they are minor, and beyond the one patch already separately posted they are not 11.1 material. This is complex enough to warrant a very close look. I hope that the code structure is cleaner than before, so that should help. r~ Richard Henderson (17): include/user/guest-host: Include exec/abi_ptr.h target/arm: Fix testing of raw mtx value target/arm: Move helper_dc_zva to mte_helper.c target/arm: Raise alignment fault for DC_ZVA on Device memory target/arm: Imply probe from allocation_tag_mem_probe target/arm: Simplify invalid page test in allocation_tag_mem_internal target/arm: Return struct from allocation_tag_mem_internal target/arm: Generalize probe argument to allocation_tag_mem_internal target/arm: Drop TLB_MMIO check in allocation_tag_mem_internal target/arm: Probe second page earlier in allocation_tag_mem_internal target/arm: Expand dczid_bs in DisasContext target/arm: Split out helpers for creating MTEDESC accel/tcg: Clean addreses in the user-only probe_access api target/arm: Drop clean_addr_tbi before helper_dc_zva target/arm: Pass MTEDESC to helper_dc_zva target/arm: Create helper_dc_zva_mte target/arm: Rewrite DC_GVA, DC_GZVA, STZGM include/user/guest-host.h | 1 + target/arm/tcg/helper-a64-defs.h | 9 +- target/arm/tcg/mte_helper.h | 18 +- target/arm/tcg/translate.h | 4 +- accel/tcg/user-exec.c | 10 +- target/arm/gdbstub64.c | 10 +- target/arm/tcg/helper-a64.c | 50 --- target/arm/tcg/mte_helper.c | 643 ++++++++++++++++++++----------- target/arm/tcg/translate-a64.c | 189 ++++----- 9 files changed, 530 insertions(+), 404 deletions(-) -- 2.43.0
