Skip to content

Commit af3215f

Browse files
brooniectmarinas
authored andcommitted
arm64/fpsimd: Exit streaming mode when flushing tasks
Ensure there is no path where we might attempt to save SME state after we flush a task by updating the SVCR register state as well as updating our in memory state. I haven't seen a specific case where this is happening or seen a path where it might happen but for the cost of a single low overhead instruction it seems sensible to close the potential gap. Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent ab9b400 commit af3215f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/arm64/kernel/fpsimd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,6 +1649,7 @@ void fpsimd_flush_thread(void)
16491649

16501650
fpsimd_flush_thread_vl(ARM64_VEC_SME);
16511651
current->thread.svcr = 0;
1652+
sme_smstop();
16521653
}
16531654

16541655
current->thread.fp_type = FP_STATE_FPSIMD;

0 commit comments

Comments
 (0)