diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2022-11-29 17:22:14 +0100 |
---|---|---|
committer | Alexander Gordeev <agordeev@linux.ibm.com> | 2022-12-06 16:18:25 +0100 |
commit | 742aed05af97dc5ba6c53a4b6cb6a7b31e32f9e9 (patch) | |
tree | bdde363f98f9fac1bedb7a2c1b5c4255eb94fba3 /arch/s390/kernel/nmi.c | |
parent | 506faa5b9b4f05e667b39252a28dace17a5017a1 (diff) | |
download | linux-742aed05af97dc5ba6c53a4b6cb6a7b31e32f9e9.tar.bz2 |
s390/nmi: move storage error checking back to C, enter with DAT on
Checking for storage errors in machine check entry code was done in order
to handle also storage errors on kernel page tables. However this is
extremely unlikely and some basic assumptions what works on machine check
entry are necessary anyway. In order to simplify machine check handling
delay checking for storage errors to C code.
With this also change the machine check new PSW to have DAT on, which
simplifies the entry code even further.
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/nmi.c')
-rw-r--r-- | arch/s390/kernel/nmi.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/s390/kernel/nmi.c b/arch/s390/kernel/nmi.c index b1579c85b869..b54d4aa33851 100644 --- a/arch/s390/kernel/nmi.c +++ b/arch/s390/kernel/nmi.c @@ -487,7 +487,21 @@ int notrace s390_do_machine_check(struct pt_regs *regs) mcck->stp_queue |= stp_island_check(); mcck_pending = 1; } - + /* + * Reinject storage related machine checks into the guest if they + * happen when the guest is running. + */ + if (!test_cpu_flag(CIF_MCCK_GUEST)) { + /* Storage error uncorrected */ + if (mci.se) + s390_handle_damage(); + /* Storage key-error uncorrected */ + if (mci.ke) + s390_handle_damage(); + /* Storage degradation */ + if (mci.ds && mci.fa) + s390_handle_damage(); + } if (mci.cp) { /* Channel report word pending */ mcck->channel_report = 1; |