]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: s390: rework broken SIGP STOP interrupt handling
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Mon, 28 Jul 2014 12:05:41 +0000 (14:05 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 31 Jul 2014 07:20:35 +0000 (09:20 +0200)
commited734eb7fe7abbcfc1c44c23504f04af5bd27f4d
treeddf5e5d2c001208e0e1436921aa81671dbcca1ae
parent91b5e7c95f9b5499190d0cdbdec1f3ec5b332e9d
KVM: s390: rework broken SIGP STOP interrupt handling

A VCPU might never stop if it intercepts (for whatever reason) between
"fake interrupt delivery" and execution of the stop function.

Heart of the problem is that SIGP STOP is an interrupt that has to be
processed on every SIE entry until the VCPU finally executes the stop
function.

This problem was made apparent by commit 1484378517e6aa73e49cf5b0c63
(KVM: s390: allow only one SIGP STOP (AND STORE STATUS) at a time).
With the old code, the guest could (incorrectly) inject SIGP STOPs
multiple times. The bug of losing a sigp stop exists in KVM before
1484378517, but it was hidden by Linux guests doing a sigp stop loop.
The new code (rightfully) returns CC=2 and does not queue a new
interrupt.

This patch is a simple fix of the problem. Longterm we are going to
rework that code - e.g. get rid of the action bits and so on.

Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
[some additional patch description]
arch/s390/kvm/interrupt.c