[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 04/11] target/arm: When tag memory is not present, set MTE=1
From: |
Richard Henderson |
Subject: |
[PATCH v2 04/11] target/arm: When tag memory is not present, set MTE=1 |
Date: |
Fri, 11 Aug 2023 14:40:24 -0700 |
When the cpu support MTE, but the system does not, reduce cpu
support to user instructions at EL0 instead of completely
disabling MTE. If we encounter a cpu implementation which does
something else, we can revisit this setting.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/cpu.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 37e8c35677..85c02308e4 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -2067,12 +2067,13 @@ static void arm_cpu_realizefn(DeviceState *dev, Error
**errp)
#ifndef CONFIG_USER_ONLY
/*
- * Disable the MTE feature bits if we do not have tag-memory
- * provided by the machine.
+ * If we do not have tag-memory provided by the machine,
+ * reduce MTE support to instructions enabled at EL0.
+ * This matches Cortex-A710 BROADCASTMTE input being LOW.
*/
if (cpu->tag_memory == NULL) {
cpu->isar.id_aa64pfr1 =
- FIELD_DP64(cpu->isar.id_aa64pfr1, ID_AA64PFR1, MTE, 0);
+ FIELD_DP64(cpu->isar.id_aa64pfr1, ID_AA64PFR1, MTE, 1);
}
#endif
}
--
2.34.1
- [PATCH v2 00/11] target/arm: Implement cortex-a710, Richard Henderson, 2023/08/11
- [PATCH v2 06/11] target/arm: Apply access checks to neoverse-n1 special registers, Richard Henderson, 2023/08/11
- [PATCH v2 04/11] target/arm: When tag memory is not present, set MTE=1,
Richard Henderson <=
- [PATCH v2 08/11] target/arm: Implement RMR_EL3 for neoverse-v1, Richard Henderson, 2023/08/11
- [PATCH v2 09/11] target/arm: Suppress FEAT_TRBE (Trace Buffer Extension), Richard Henderson, 2023/08/11
- [PATCH v2 03/11] target/arm: Support more GM blocksizes, Richard Henderson, 2023/08/11
- [PATCH v2 10/11] target/arm: Implement FEAT_HPDS2 as a no-op, Richard Henderson, 2023/08/11
- [PATCH v2 02/11] target/arm: Allow cpu to configure GM blocksize, Richard Henderson, 2023/08/11