s390/nmi: handle guarded storage validity failures for KVM guests
authorChristian Borntraeger <borntraeger@linux.ibm.com>
Thu, 13 Jan 2022 10:44:19 +0000 (11:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Feb 2022 16:26:59 +0000 (17:26 +0100)
commitc058e1ae9dd516cbc8b6a38dc6d67d70479dfbbf
tree9e00c496fd9605ae55aadfe352cd84013e9fba92
parent4abcb06fdcb29ae150ab8ae6a7c34cb9a921fe97
s390/nmi: handle guarded storage validity failures for KVM guests

commit 1ea1d6a847d2b1d17fefd9196664b95f052a0775 upstream.

machine check validity bits reflect the state of the machine check. If a
guest does not make use of guarded storage, the validity bit might be
off. We can not use the host CR bit to decide if the validity bit must
be on. So ignore "invalid" guarded storage controls for KVM guests in
the host and rely on the machine check being forwarded to the guest.  If
no other errors happen from a host perspective everything is fine and no
process must be killed and the host can continue to run.

Cc: stable@vger.kernel.org
Fixes: c929500d7a5a ("s390/nmi: s390: New low level handling for machine check happening in guest")
Reported-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Tested-by: Carsten Otte <cotte@de.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/kernel/nmi.c