]> xenbits.xensource.com Git - qemu-xen.git/commit
target/arm: Fix unaligned checks for mte_check1, mte_probe1
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 16 Apr 2021 18:31:00 +0000 (11:31 -0700)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 30 Apr 2021 10:16:49 +0000 (11:16 +0100)
commit4a09a21345e8adb4734ecb5be59bac9c4d82aa85
treea1f38925039856dc3eeadbba9a32e856604d66aa
parentf8c8a8606071b2966f83ebaccc69714ac3cad548
target/arm: Fix unaligned checks for mte_check1, mte_probe1

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.

We cannot tell a priori whether or not a given scalar access is aligned,
therefore we must at least check.  Use mte_probe_int, which is already
set up for checking multiple granules.

Buglink: https://bugs.launchpad.net/bugs/1921948
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210416183106.1516563-4-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/mte_helper.c