On Fri, 25 Jul 2025 at 17:46, Richard Henderson <[email protected]> wrote: > > On 7/25/25 04:22, Peter Maydell wrote: > > A recent change to the kernel (Linux commit b376108e1f88 > > "arm64/fpsimd: signal: Clear TPIDR2 when delivering signals") updated > > the signal-handler entry code to always clear TPIDR2_EL0. > > Ah, I missed seeing that. > > > /* Invoke the signal handler with both SM and ZA disabled. */ > > aarch64_set_svcr(env, 0, R_SVCR_SM_MASK | R_SVCR_ZA_MASK); > > + if (cpu_isar_feature(aa64_sme, env_archcpu(env))) { > > + env->cp15.tpidr2_el0 = 0; > > + } > > You can omit the IF and unconditionally clear the memory. > > > Reviewed-by: Richard Henderson <[email protected]>
Thanks -- just noticed also that it would be reasonable to update the comment: + /* + * Invoke the signal handler with a clean SME state: both SM and ZA + * disabled and TPIDR2_EL0 cleared. + */ since all three things are SME related. -- PMM
