[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected. No action required from the submitter.
The upstream commit SHA1 provided is correct: baa8515281b30861cff3da7db70662d2a25c6440
Status in newer kernel trees: 6.14.y | Present (exact SHA1) 6.13.y | Present (exact SHA1) 6.12.y | Present (exact SHA1) 6.6.y | Present (exact SHA1)
Note: The patch differs from the upstream commit: --- 1: baa8515281b30 ! 1: dd25288bc37b5 arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE @@ Metadata ## Commit message ## arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE
+ [ Upstream commit baa8515281b30861cff3da7db70662d2a25c6440 ] + When we save the state for the floating point registers this can be done in the form visible through either the FPSIMD V registers or the SVE Z and P registers. At present we track which format is currently used based on @@ Commit message Reviewed-by: Marc Zyngier maz@kernel.org Link: https://lore.kernel.org/r/20221115094640.112848-3-broonie@kernel.org Signed-off-by: Will Deacon will@kernel.org + [ Mark: fix conflicts due to earlier backports ] + Signed-off-by: Mark Rutland mark.rutland@arm.com + Signed-off-by: Mark Brown broonie@kernel.org
## arch/arm64/include/asm/fpsimd.h ## @@ arch/arm64/include/asm/fpsimd.h: extern void fpsimd_kvm_prepare(void); @@ arch/arm64/kernel/fpsimd.c: int vec_set_vector_length(struct task_struct *task, + task->thread.fp_type = FP_STATE_FPSIMD; + }
- if (system_supports_sme() && type == ARM64_VEC_SME) { - task->thread.svcr &= ~(SVCR_SM_MASK | + if (system_supports_sme()) { + if (type == ARM64_VEC_SME || @@ arch/arm64/kernel/fpsimd.c: static void sve_init_regs(void) fpsimd_bind_task_to_cpu(); } else { fpsimd_to_sve(current); + current->thread.fp_type = FP_STATE_SVE; + fpsimd_flush_task_state(current); } } - @@ arch/arm64/kernel/fpsimd.c: void fpsimd_flush_thread(void) current->thread.svcr = 0; } @@ arch/arm64/kernel/ptrace.c: static int sve_set_common(struct task_struct *target }
@@ arch/arm64/kernel/ptrace.c: static int sve_set_common(struct task_struct *target, - */ fpsimd_sync_to_sve(target); - set_tsk_thread_flag(target, TIF_SVE); + if (type == ARM64_VEC_SVE) + set_tsk_thread_flag(target, TIF_SVE); + target->thread.fp_type = FP_STATE_SVE;
BUILD_BUG_ON(SVE_PT_SVE_OFFSET != sizeof(header)); ---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-6.6.y | Success | Success |