]> www.infradead.org Git - users/dwmw2/qemu.git/commit
gdbstub: Use specific MMU index when probing MTE addresses
authorGustavo Romero <gustavo.romero@linaro.org>
Tue, 10 Sep 2024 17:38:56 +0000 (18:38 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Tue, 10 Sep 2024 22:33:48 +0000 (23:33 +0100)
commitf6110605313aaea66307f2470a85b7c053542442
tree80ac48912e84a02462e3ba079f2b3dd04156b5e3
parent8c68c11cf3a940c14f23a599a78f0baf3c536d7a
gdbstub: Use specific MMU index when probing MTE addresses

Use cpu_mmu_index() to determine the specific translation regime (MMU
index) before probing addresses using allocation_tag_mem_probe().

Currently, the MMU index is hardcoded to 0 and only works for user mode.
By obtaining the specific MMU index according to the translation regime,
future use of the stubs relying on allocation_tag_mem_probe in other
regimes will be possible, like in EL1.

This commit also changes the ptr_size value passed to
allocation_tag_mem_probe() from 8 to 1. The ptr_size parameter actually
represents the number of bytes in the memory access (which can be as
small as 1 byte), rather than the number of bits used in the address
space pointed to by ptr.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240906143316.657436-2-gustavo.romero@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240910173900.4154726-7-alex.bennee@linaro.org>
target/arm/gdbstub64.c