KVM: s390: do store status after handling STOP_ON_STOP bit
authorJens Freimann <jfrei@linux.vnet.ibm.com>
Mon, 6 Feb 2012 09:59:03 +0000 (10:59 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 30 May 2012 23:43:13 +0000 (00:43 +0100)
commitefa862c5ee7902fdb0dbefc1529d16a9e19d0f48
treeebf677ba032c979291ef19cdecfc8090775f56ba
parent0c837de6cac54ba14e638d36606bd31f635d8de5
KVM: s390: do store status after handling STOP_ON_STOP bit

(cherry picked from commit 9e0d5473e2f0ba2d2fe9dab9408edef3060b710e)

In handle_stop() handle the stop bit before doing the store status as
described for "Stop and Store Status" in the Principles of Operation.
We have to give up the local_int.lock before calling kvm store status
since it calls gmap_fault() which might sleep. Since local_int.lock
only protects local_int.* and not guest memory we can give up the lock.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/s390/kvm/intercept.c