opnsense-src/sys/powerpc
Shawn Anastasio 62646709fd powerpc: Fix inconsistent Altivec handling in set_mcontext
When support for fpu_kern_enter/fpu_kern_leave was added to powerpc,
set_mcontext was updated to handle Altivec state restoration in the same
way that the FPU state by lazily restoring the context on the first
trap. However the function was not correctly updated to unconditionally
clear the PCB_VEC and PSL_VEC bits from the pcb's flags and srr1
respectively which can sometimes result in a mismatch between a
process's MSR[VEC] state and its pcb_flags.

Fix this by simply clearing the VEC flags unconditionally in
set_mcontext, which is already done for FPU/VSX.

Fixes: a6662c37b6ffe ("powerpc: Implement fpu_kern_enter/fpu_kern_leave")

Reviewed by:	alfredo
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D42417

(cherry picked from commit 270f75cf3433807d124cdf1f0072ab801532f425)
2023-11-19 17:57:57 -03:00
..
aim powerpc pmap: initialize kernel pmap radix trie 2023-09-19 21:09:37 -05:00
amigaone sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
booke pmap: Prefer consistent naming for loader tunable 2023-10-23 18:12:21 +08:00
conf release: update stable/14 following branching from main 2023-08-24 19:07:33 -04:00
cpufreq sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
fpu sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
include powerpc: Implement fpu_kern_enter/fpu_kern_leave 2023-11-19 17:55:24 -03:00
mambo sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
mikrotik sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
mpc85xx sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ofw sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
powermac sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
powernv sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
powerpc powerpc: Fix inconsistent Altivec handling in set_mcontext 2023-11-19 17:57:57 -03:00
ps3 sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
pseries sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
psim sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00