aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Freimann <jfrei@linux.vnet.ibm.com>2014-08-13 04:09:04 -0400
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-11-28 07:59:05 -0500
commitfc2020cfe9f8102d17dad79ed96dc68a9d84b19e (patch)
tree6c2aae4d5618feb92cf1952ef7c29720a9324e7f
parent383d0b050106abecb82f43101cac94fa423af5cd (diff)
KVM: s390: allow injecting all kinds of machine checks
Allow to specify CR14, logout area, external damage code and failed storage address. Since more then one machine check can be indicated to the guest at a time we need to combine all indication bits with already pending requests. Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
-rw-r--r--arch/s390/kvm/interrupt.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index 1aa7f2845ca8..b3d4409fcf3f 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -1063,11 +1063,19 @@ static int __inject_mchk(struct kvm_vcpu *vcpu, struct kvm_s390_irq *irq)
1063 mchk->mcic, 2); 1063 mchk->mcic, 2);
1064 1064
1065 /* 1065 /*
1066 * Combine mcic with previously injected machine checks and 1066 * Because repressible machine checks can be indicated along with
1067 * indicate them all together as described in the Principles 1067 * exigent machine checks (PoP, Chapter 11, Interruption action)
1068 * of Operation, Chapter 11, Interruption action 1068 * we need to combine cr14, mcic and external damage code.
1069 * Failing storage address and the logout area should not be or'ed
1070 * together, we just indicate the last occurrence of the corresponding
1071 * machine check
1069 */ 1072 */
1073 mchk->cr14 |= irq->u.mchk.cr14;
1070 mchk->mcic |= irq->u.mchk.mcic; 1074 mchk->mcic |= irq->u.mchk.mcic;
1075 mchk->ext_damage_code |= irq->u.mchk.ext_damage_code;
1076 mchk->failing_storage_address = irq->u.mchk.failing_storage_address;
1077 memcpy(&mchk->fixed_logout, &irq->u.mchk.fixed_logout,
1078 sizeof(mchk->fixed_logout));
1071 if (mchk->mcic & MCHK_EX_MASK) 1079 if (mchk->mcic & MCHK_EX_MASK)
1072 set_bit(IRQ_PEND_MCHK_EX, &li->pending_irqs); 1080 set_bit(IRQ_PEND_MCHK_EX, &li->pending_irqs);
1073 else if (mchk->mcic & MCHK_REP_MASK) 1081 else if (mchk->mcic & MCHK_REP_MASK)