@samitouri / QOSamiQemu / commits / 7e637052fa

target/arm: advertise FEAT_RNG_TRAP on cortex-max

Set ID_AA64PFR1.RNDR_TRAP=1 on the max CPU model so guests and firmware detect FEAT_RNG_TRAP, per the Arm Architecture Reference Manual for A-profile architecture (DDI 0487), and document the feature as emulated in docs/system/arm/emulation.rst. Signed-off-by: Jason Wright <wrigjl@proton.me> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Jason Wright committed May 28, 2026 at 18:19 UTC 7e637052fa2a4aa1032284284c9d6733d561d1be
2 files changed +2
docs/system/arm/emulation.rst
+1
@@ -136,6 +136,7 @@ the following architecture extensions:
136 - FEAT_RME (Realm Management Extension) (NB: support status in QEMU is experimental)
137 - FEAT_RME_GPC2 (RME Granule Protection Check 2 Extension)
138 - FEAT_RNG (Random number generator)
139 +- FEAT_RNG_TRAP (Trapping support for RNDR/RNDRRS)
140 - FEAT_RPRES (Increased precision of FRECPE and FRSQRTE)
141 - FEAT_S1PIE (Stage 1 permission indirections)
142 - FEAT_S2PIE (Stage 2 permission indirections)
target/arm/tcg/cpu64.c
+1
@@ -1292,6 +1292,7 @@ void aarch64_max_tcg_initfn(Object *obj)
1292 t = FIELD_DP64(t, ID_AA64PFR1, MTE, 3); /* FEAT_MTE3 */
1293 t = FIELD_DP64(t, ID_AA64PFR1, RAS_FRAC, 0); /* FEAT_RASv1p1 + FEAT_DoubleFault */
1294 t = FIELD_DP64(t, ID_AA64PFR1, SME, 2); /* FEAT_SME2 */
1295 + t = FIELD_DP64(t, ID_AA64PFR1, RNDR_TRAP, 1); /* FEAT_RNG_TRAP */
1296 t = FIELD_DP64(t, ID_AA64PFR1, CSV2_FRAC, 0); /* FEAT_CSV2_3 */
1297 t = FIELD_DP64(t, ID_AA64PFR1, NMI, 1); /* FEAT_NMI */
1298 t = FIELD_DP64(t, ID_AA64PFR1, GCS, 1); /* FEAT_GCS */