From: Heiko Carstens Date: Tue, 26 Jun 2012 14:06:38 +0000 (+0200) Subject: KVM: s390: fix sigp sense running condition code handling X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7ba26c482fcb42b01785ee1f39871fcc636ab3fe;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Heiko Carstens Signed-off-by: Cornelia Huck Signed-off-by: Marcelo Tosatti --- 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, if (atomic_read(fi->local_int[cpu_addr]->cpuflags) & CPUSTAT_RUNNING) { /* running */ - rc = 1; + rc = 0; } else { /* not running */ *reg &= 0xffffffff00000000UL; *reg |= SIGP_STATUS_NOT_RUNNING; - rc = 0; + rc = 1; } } spin_unlock(&fi->lock);