31091dea96
We somewhat blindly copy the srr1 from the new context to the trap frame, but disable FPU and VSX unconditionally, relying on the trap to re-enable them. This works because the FPU manages the VSX extended FP registers, which is governed by the PCB_FPFREGS flag. However, with altivec, we would blindly disable PSL_VEC, without touching PCB_VEC. Handle this case by disabling altivec in both srr1 and pcb_flags, if the mcontext doesn't have _MC_AV_VALID set. Reported by: pkubaj