aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/sigp.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2012-06-26 10:06:38 -0400
committerMarcelo Tosatti <mtosatti@redhat.com>2012-07-03 13:55:34 -0400
commit7ba26c482fcb42b01785ee1f39871fcc636ab3fe (patch)
tree95f4562d2029ac83dd9a5b119326d1e7c3a309d0 /arch/s390/kvm/sigp.c
parent9b747530d928800c9eb7f0c131dffd2cc868c475 (diff)
KVM: s390: fix sigp sense running condition code handling
Only if the sensed cpu is not running a status is stored, which is reflected by condition code 1. If the cpu is running, condition code 0 should be returned. Just the opposite of what the code is doing. Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/s390/kvm/sigp.c')
-rw-r--r--arch/s390/kvm/sigp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
index fda1d64f15ee..caccc0ee9cee 100644
--- a/arch/s390/kvm/sigp.c
+++ b/arch/s390/kvm/sigp.c
@@ -268,12 +268,12 @@ static int __sigp_sense_running(struct kvm_vcpu *vcpu, u16 cpu_addr,
268 if (atomic_read(fi->local_int[cpu_addr]->cpuflags) 268 if (atomic_read(fi->local_int[cpu_addr]->cpuflags)
269 & CPUSTAT_RUNNING) { 269 & CPUSTAT_RUNNING) {
270 /* running */ 270 /* running */
271 rc = 1; 271 rc = 0;
272 } else { 272 } else {
273 /* not running */ 273 /* not running */
274 *reg &= 0xffffffff00000000UL; 274 *reg &= 0xffffffff00000000UL;
275 *reg |= SIGP_STATUS_NOT_RUNNING; 275 *reg |= SIGP_STATUS_NOT_RUNNING;
276 rc = 0; 276 rc = 1;
277 } 277 }
278 } 278 }
279 spin_unlock(&fi->lock); 279 spin_unlock(&fi->lock);