Skip to contentSkip to conversation

target/arm: Fix incorrect aa64_tidcp1 feature check

PATCH In review Peter Maydell 2 participants 2 messages Jan 23, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/arm: Fix incorrect aa64_tidcp1 feature check

A typo in the implementation of isar_feature_aa64_tidcp1() means we were checking the field in the wrong ID register, so we might have provided the feature on CPUs that don't have it and not provided it on CPUs that should have it. Correct this bug.

Fixes 9cd0c0dec97be9 "target/arm: Implement FEAT_TIDCP1"

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2120

---
 target/arm/cpu-features.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/arm/cpu-features.h +1 -1
index 7a590c824cf..24525e36349 100644
@@ -771,7 +771,7 @@ static inline bool isar_feature_aa64_hcx(const ARMISARegisters *id)
 
 static inline bool isar_feature_aa64_tidcp1(const ARMISARegisters *id)
 {
-    return FIELD_EX64(id->id_aa64mmfr2, ID_AA64MMFR1, TIDCP1) != 0;
+    return FIELD_EX64(id->id_aa64mmfr1, ID_AA64MMFR1, TIDCP1) != 0;
 }
 
 static inline bool isar_feature_aa64_hafs(const ARMISARegisters *id)
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Peter Maydell

A typo in the implementation of isar_feature_aa64_tidcp1() means we were checking the field in the wrong ID register, so we might have provided the feature on CPUs that don't have it and not provided it on CPUs that should have it. Correct this bug.

Quoted 7 lines
Fixes 9cd0c0dec97be9 "target/arm: Implement FEAT_TIDCP1"

Resolves:https://gitlab.com/qemu-project/qemu/-/issues/2120

---
  target/arm/cpu-features.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

r~