]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: s390: Backup the guest's machine check info
authorQingFeng Hao <haoqf@linux.vnet.ibm.com>
Wed, 7 Jun 2017 09:41:19 +0000 (11:41 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 27 Jun 2017 14:05:38 +0000 (16:05 +0200)
commit9f8e153759b667b4e5b65c4aaa0db2f32526efd0
tree6ebff6f83cbc639d76554660494d42f83c60c08e
parent11a9325b66677009f7c0267052b741e6c76a079d
KVM: s390: Backup the guest's machine check info

When a machine check happens in the guest, related mcck info (mcic,
external damage code, ...) is stored in the vcpu's lowcore on the host.
Then the machine check handler's low-level part is executed, followed
by the high-level part.

If the high-level part's execution is interrupted by a new machine check
happening on the same vcpu on the host, the mcck info in the lowcore is
overwritten with the new machine check's data.

If the high-level part's execution is scheduled to a different cpu,
the mcck info in the lowcore is uncertain.

Therefore, for both cases, the further reinjection to the guest will use
the wrong data.
Let's backup the mcck info in the lowcore to the sie page
for further reinjection, so that the right data will be used.

Add new member into struct sie_page to store related machine check's
info of mcic, failing storage address and external damage code.

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/kvm_host.h
arch/s390/kernel/nmi.c
arch/s390/kvm/kvm-s390.c