mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-13 21:02:35 +00:00
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>
This commit is contained in:
parent
9b747530d9
commit
7ba26c482f
@ -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)
|
if (atomic_read(fi->local_int[cpu_addr]->cpuflags)
|
||||||
& CPUSTAT_RUNNING) {
|
& CPUSTAT_RUNNING) {
|
||||||
/* running */
|
/* running */
|
||||||
rc = 1;
|
rc = 0;
|
||||||
} else {
|
} else {
|
||||||
/* not running */
|
/* not running */
|
||||||
*reg &= 0xffffffff00000000UL;
|
*reg &= 0xffffffff00000000UL;
|
||||||
*reg |= SIGP_STATUS_NOT_RUNNING;
|
*reg |= SIGP_STATUS_NOT_RUNNING;
|
||||||
rc = 0;
|
rc = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
spin_unlock(&fi->lock);
|
spin_unlock(&fi->lock);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user