KVM: s390: Inject machine check into the guest
authorQingFeng Hao <haoqf@linux.vnet.ibm.com>
Wed, 7 Jun 2017 10:03:05 +0000 (12:03 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 28 Jun 2017 10:42:32 +0000 (12:42 +0200)
commit4d62fcc0b692e3b4058d7d138114c27cd8b011f7
tree15d015759081e2caefafba193adb9a7628848685
parentaec3b2c5f929c31d5517e36e2068617179d0fefd
KVM: s390: Inject machine check into the guest

If the exit flag of SIE indicates that a machine check has happened
during guest's running and needs to be injected, inject it to the guest
accordingly.
But some machine checks, e.g. Channel Report Pending (CRW), refer to
host conditions only (the guest's channel devices are not managed by
the kernel directly) and are therefore not injected into the guest.
External Damage (ED) is also not reinjected into the guest because ETR
conditions are gone in Linux and STP conditions are not enabled in the
guest, and ED contains only these 8 ETR and STP conditions.
In general, instruction-processing damage, system recovery,
storage error, service-processor damage and channel subsystem damage
will be reinjected into the guest, and the remain (System damage,
timing-facility damage, warning, ED and CRW) will be handled on the host.

Signed-off-by: QingFeng Hao <haoqf@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/nmi.h
arch/s390/kvm/interrupt.c
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/kvm-s390.h