From: Richard Henderson Date: Wed, 8 Oct 2025 21:55:30 +0000 (-0700) Subject: target/arm: Implement gcs bit for data abort X-Git-Tag: v10.2.0-rc1~67^2~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a0dda3e6b2394d0e96c16b80f44db97f9cc3e6e;p=thirdparty%2Fqemu.git target/arm: Implement gcs bit for data abort Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-id: 20251008215613.300150-31-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- diff --git a/target/arm/tcg/tlb_helper.c b/target/arm/tcg/tlb_helper.c index ae2acd6727..f1983a5732 100644 --- a/target/arm/tcg/tlb_helper.c +++ b/target/arm/tcg/tlb_helper.c @@ -28,7 +28,7 @@ static inline uint64_t merge_syn_data_abort(uint32_t template_syn, ARMMMUFaultInfo *fi, unsigned int target_el, bool same_el, bool is_write, - int fsc) + int fsc, bool gcs) { uint64_t syn; @@ -78,6 +78,7 @@ static inline uint64_t merge_syn_data_abort(uint32_t template_syn, /* Form ISS2 at the top of the syndrome. */ syn |= (uint64_t)fi->dirtybit << 37; + syn |= (uint64_t)gcs << 40; return syn; } @@ -252,9 +253,10 @@ void arm_deliver_fault(ARMCPU *cpu, vaddr addr, syn = syn_insn_abort(same_el, fi->ea, fi->s1ptw, fsc); exc = EXCP_PREFETCH_ABORT; } else { + bool gcs = regime_is_gcs(core_to_arm_mmu_idx(env, mmu_idx)); syn = merge_syn_data_abort(env->exception.syndrome, fi, target_el, same_el, access_type == MMU_DATA_STORE, - fsc); + fsc, gcs); if (access_type == MMU_DATA_STORE && arm_feature(env, ARM_FEATURE_V6)) { fsr |= (1 << 11);