KVM: s390: make sigp restart return busy when stop pending
authorJens Freimann <jfrei@linux.vnet.ibm.com>
Wed, 8 Feb 2012 07:28:29 +0000 (08:28 +0100)
committerAvi Kivity <avi@redhat.com>
Thu, 8 Mar 2012 12:10:15 +0000 (14:10 +0200)
commit151104a7b3a82f9c56d636595ae58084049d2559
tree486ab76f3e0d10a0c8bc7b87691a797debbc4643
parent9e0d5473e2f0ba2d2fe9dab9408edef3060b710e
KVM: s390: make sigp restart return busy when stop pending

On reboot the guest sends in smp_send_stop() a sigp stop to all CPUs
except for current CPU.  Then the guest switches to the IPL cpu by
sending a restart to the IPL CPU, followed by a sigp stop to the
current cpu. Since restart is handled by userspace it's possible that
the restart is delivered before the old stop.  This means that the IPL
CPU isn't restarted and we have no running CPUs. So let's make sure
that there is no stop action pending when we do the restart.

Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/s390/kvm/sigp.c