]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
s390/nmi: improve revalidation of fpu / vector registers
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 22 Aug 2016 12:40:06 +0000 (14:40 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 29 Aug 2016 09:05:03 +0000 (11:05 +0200)
commit8f149ea6e91534c3e0b4cfcd843323bd94273087
tree93c863eae7dd85f32fb8208cfe3497da0890e1b0
parent7f79695cc1b6aa6d80a861780d9f8ce75d3dddcb
s390/nmi: improve revalidation of fpu / vector registers

The machine check handler will do one of two things if the floating-point
control, a floating point register or a vector register can not be
revalidated:
1) if the PSW indicates user mode the process is terminated
2) if the PSW indicates kernel mode the system is stopped

To unconditionally stop the system for 2) is incorrect.

There are three possible outcomes if the floating-point control, a
floating point register or a vector registers can not be revalidated:
1) The kernel is inside a kernel_fpu_begin/kernel_fpu_end block and
   needs the register. The system is stopped.
2) No active kernel_fpu_begin/kernel_fpu_end block and the CIF_CPU bit
   is not set. The user space process needs the register and is killed.
3) No active kernel_fpu_begin/kernel_fpu_end block and the CIF_FPU bit
   is set. Neither the kernel nor the user space process needs the
   lost register. Just revalidate it and continue.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/nmi.c