diff options
author | David Hildenbrand <dahi@linux.vnet.ibm.com> | 2015-04-30 07:33:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-07-10 12:49:36 -0400 |
commit | 14fe2f14d73609cfdb19b71467d085e5347f7353 (patch) | |
tree | 972c59346c46744014a6e217a0d2cd8d4387f07c /arch | |
parent | 4f3d3bc20372afb29708307608946e2bb56a5a64 (diff) |
KVM: s390: fix external call injection without sigp interpretation
commit b938eacea0b6881f2116a061e6da3ec840e75137 upstream.
Commit ea5f49692575 ("KVM: s390: only one external call may be pending
at a time") introduced a bug on machines that don't have SIGP
interpretation facility installed.
The injection of an external call will now always fail with -EBUSY
(if none is already pending).
This leads to the following symptoms:
- An external call will be injected but with the wrong "src cpu id",
as this id will not be remembered.
- The target vcpu will not be woken up, therefore the guest will hang if
it cannot deal with unexpected failures of the SIGP EXTERNAL CALL
instruction.
- If an external call is already pending, -EBUSY will not be reported.
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/kvm/interrupt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 9de47265ef73..2836b25f63d3 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
@@ -1061,7 +1061,7 @@ static int __inject_extcall(struct kvm_vcpu *vcpu, struct kvm_s390_irq *irq) | |||
1061 | if (sclp_has_sigpif()) | 1061 | if (sclp_has_sigpif()) |
1062 | return __inject_extcall_sigpif(vcpu, src_id); | 1062 | return __inject_extcall_sigpif(vcpu, src_id); |
1063 | 1063 | ||
1064 | if (!test_and_set_bit(IRQ_PEND_EXT_EXTERNAL, &li->pending_irqs)) | 1064 | if (test_and_set_bit(IRQ_PEND_EXT_EXTERNAL, &li->pending_irqs)) |
1065 | return -EBUSY; | 1065 | return -EBUSY; |
1066 | *extcall = irq->u.extcall; | 1066 | *extcall = irq->u.extcall; |
1067 | atomic_set_mask(CPUSTAT_EXT_INT, li->cpuflags); | 1067 | atomic_set_mask(CPUSTAT_EXT_INT, li->cpuflags); |