@samitouri / QOSamiQemu / commits / 13dbcfcc81

target/arm: Trap direct acceses to FPMR

Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20260522220306.235200-14-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Richard Henderson committed May 22, 2026 at 15:02 UTC 13dbcfcc816f20e5b14d40b28ae4971e257329b6
1 file changed +4
target/arm/tcg/translate-a64.c
+4
@@ -2899,6 +2899,10 @@ static void handle_sys(DisasContext *s, bool isread,
2899 }
2900
2901 if (!skip_fp_access_checks) {
2902 + if ((ri->type & ARM_CP_FPMR) && s->fpmr_el != 0) {
2903 + gen_exception_insn_el(s, 0, EXCP_UDEF, syndrome, s->fpmr_el);
2904 + return;
2905 + }
2906 if ((ri->type & ARM_CP_FPU) && !fp_access_check_only(s)) {
2907 return;
2908 } else if ((ri->type & ARM_CP_SVE) && !sve_access_check(s)) {