diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-07-07 11:36:08 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-07-07 11:36:08 +0100 |
commit | 95047cdeb3d6cb8e4e2fecc82994afbb51b3352e (patch) | |
tree | 89a4d91cedbe1e7b85b588c8be17b3283919e78f /target/arm | |
parent | a4f3791143d8f98a5a9216b94d33a232ebf12c25 (diff) | |
download | qemu-95047cdeb3d6cb8e4e2fecc82994afbb51b3352e.zip qemu-95047cdeb3d6cb8e4e2fecc82994afbb51b3352e.tar.gz qemu-95047cdeb3d6cb8e4e2fecc82994afbb51b3352e.tar.bz2 |
target/arm: Record tagged bit for user-only in sve_probe_page
Fixes a bug in that we were not honoring MTE from user-only
SVE. Copy the user-only MTE logic from allocation_tag_mem
into sve_probe_page.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm')
-rw-r--r-- | target/arm/sve_helper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c index db15d03..0c6379e 100644 --- a/target/arm/sve_helper.c +++ b/target/arm/sve_helper.c @@ -5337,6 +5337,9 @@ bool sve_probe_page(SVEHostPage *info, bool nofault, CPUARMState *env, #ifdef CONFIG_USER_ONLY memset(&info->attrs, 0, sizeof(info->attrs)); + /* Require both MAP_ANON and PROT_MTE -- see allocation_tag_mem. */ + arm_tlb_mte_tagged(&info->attrs) = + (flags & PAGE_ANON) && (flags & PAGE_MTE); #else /* * Find the iotlbentry for addr and return the transaction attributes. |