aboutsummaryrefslogtreecommitdiff
path: root/hw/avr/arduino.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-04-16 11:30:58 -0700
committerPeter Maydell <peter.maydell@linaro.org>2021-04-30 11:16:49 +0100
commit98f96050aacb1f48956413832ae36392169801a1 (patch)
treed48a5135902539674dc6abc9627c31e6f28c8037 /hw/avr/arduino.c
parent8196fe9d83d6519128b514f332418bae06513970 (diff)
downloadqemu-98f96050aacb1f48956413832ae36392169801a1.zip
qemu-98f96050aacb1f48956413832ae36392169801a1.tar.gz
qemu-98f96050aacb1f48956413832ae36392169801a1.tar.bz2
target/arm: Fix mte_checkN
We were incorrectly assuming that only the first byte of an MTE access is checked against the tags. But per the ARM, unaligned accesses are pre-decomposed into single-byte accesses. So by the time we reach the actual MTE check in the ARM pseudocode, all accesses are aligned. Therefore, the first failure is always either the first byte of the access, or the first byte of the granule. In addition, some of the arithmetic is off for last-first -> count. This does not become directly visible until a later patch that passes single bytes into this function, so ptr == ptr_last. Buglink: https://bugs.launchpad.net/bugs/1921948 Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210416183106.1516563-2-richard.henderson@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> [PMM: tweaked a comment] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/avr/arduino.c')
0 files changed, 0 insertions, 0 deletions