]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: s390: Fix RUNNING flag misinterpretation
authorCornelia Huck <cornelia.huck@de.ibm.com>
Thu, 17 Nov 2011 10:00:41 +0000 (11:00 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 26 Nov 2011 17:08:33 +0000 (09:08 -0800)
commit57a3b9c22b828434d282b6f7a29d39a65d964b49
tree6e89f18e62ad18e7df28126ce0e22d4f44ac9554
parent97e14e742aa276048fa3b5456abec665799e25c0
KVM: s390: Fix RUNNING flag misinterpretation

commit 9e6dabeffd1d0ec2aa19aa076c4886067238d442 upstream.

CPUSTAT_RUNNING was implemented signifying that a vcpu is not stopped.
This is not, however, what the architecture says: RUNNING should be
set when the host is acting on the behalf of the guest operating
system.

CPUSTAT_RUNNING has been changed to be set in kvm_arch_vcpu_load()
and to be unset in kvm_arch_vcpu_put().

For signifying stopped state of a vcpu, a host-controlled bit has
been used and is set/unset basically on the reverse as the old
CPUSTAT_RUNNING bit (including pushing it down into stop handling
proper in handle_stop()).

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/s390/include/asm/kvm_host.h
arch/s390/kvm/diag.c
arch/s390/kvm/intercept.c
arch/s390/kvm/interrupt.c
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/sigp.c