s390/mcck: always enter C handler with DAT enabled
authorAlexander Gordeev <agordeev@linux.ibm.com>
Fri, 18 Jun 2021 06:17:15 +0000 (08:17 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 5 Jul 2021 10:44:23 +0000 (12:44 +0200)
commit7f6dc8d4c880f64b9d450d780d88985b264d8793
treec96580754a851422b877d68f1d8bf7e73869b3e5
parente2c13d64200bff0aa3964017cfabb0bc47691022
s390/mcck: always enter C handler with DAT enabled

The machine check handler must be entered with DAT disabled
in case control registers are corrupted or a storage error
happened and we can not tell if such error corresponds to a
page table.

Both of described conditions end up in stopping all CPUs and
entering the disabled wait in C half of the handler. However,
the storage errors are still checked after the DAT is enabled
and C code is entered. In case a page table is damaged such
flow is not expected to work.

This update paves the way for moving the storage error checks
from C to assembler half. All fatal errors that can only be
handled with DAT disabled are handled in assembler half also.
As result, the C half is only entered if the DAT is secured.

Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/entry.S
arch/s390/kernel/nmi.c