diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2011-11-17 05:00:41 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-11-17 09:25:43 -0500 |
commit | 9e6dabeffd1d0ec2aa19aa076c4886067238d442 (patch) | |
tree | 6f5f2a06184a0e4ec0b8cff8db912ce6013c5056 /arch/s390/kvm/diag.c | |
parent | 3439a8da16bcad6b0982ece938c9f8299bb53584 (diff) |
KVM: s390: Fix RUNNING flag misinterpretation
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()).
Cc: stable@kernel.org
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>
Diffstat (limited to 'arch/s390/kvm/diag.c')
-rw-r--r-- | arch/s390/kvm/diag.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c index 87cedd61be04..8943e82cd4d9 100644 --- a/arch/s390/kvm/diag.c +++ b/arch/s390/kvm/diag.c | |||
@@ -70,7 +70,7 @@ static int __diag_ipl_functions(struct kvm_vcpu *vcpu) | |||
70 | return -EOPNOTSUPP; | 70 | return -EOPNOTSUPP; |
71 | } | 71 | } |
72 | 72 | ||
73 | atomic_clear_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); | 73 | atomic_set_mask(CPUSTAT_STOPPED, &vcpu->arch.sie_block->cpuflags); |
74 | vcpu->run->s390_reset_flags |= KVM_S390_RESET_SUBSYSTEM; | 74 | vcpu->run->s390_reset_flags |= KVM_S390_RESET_SUBSYSTEM; |
75 | vcpu->run->s390_reset_flags |= KVM_S390_RESET_IPL; | 75 | vcpu->run->s390_reset_flags |= KVM_S390_RESET_IPL; |
76 | vcpu->run->s390_reset_flags |= KVM_S390_RESET_CPU_INIT; | 76 | vcpu->run->s390_reset_flags |= KVM_S390_RESET_CPU_INIT; |