aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/sigp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kvm/sigp.c')
-rw-r--r--arch/s390/kvm/sigp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
index f815118835f3..4a488a98d7f8 100644
--- a/arch/s390/kvm/sigp.c
+++ b/arch/s390/kvm/sigp.c
@@ -57,8 +57,8 @@ static int __sigp_sense(struct kvm_vcpu *vcpu, u16 cpu_addr,
57 spin_lock(&fi->lock); 57 spin_lock(&fi->lock);
58 if (fi->local_int[cpu_addr] == NULL) 58 if (fi->local_int[cpu_addr] == NULL)
59 rc = 3; /* not operational */ 59 rc = 3; /* not operational */
60 else if (atomic_read(fi->local_int[cpu_addr]->cpuflags) 60 else if (!(atomic_read(fi->local_int[cpu_addr]->cpuflags)
61 & CPUSTAT_RUNNING) { 61 & CPUSTAT_STOPPED)) {
62 *reg &= 0xffffffff00000000UL; 62 *reg &= 0xffffffff00000000UL;
63 rc = 1; /* status stored */ 63 rc = 1; /* status stored */
64 } else { 64 } else {
@@ -251,7 +251,7 @@ static int __sigp_set_prefix(struct kvm_vcpu *vcpu, u16 cpu_addr, u32 address,
251 251
252 spin_lock_bh(&li->lock); 252 spin_lock_bh(&li->lock);
253 /* cpu must be in stopped state */ 253 /* cpu must be in stopped state */
254 if (atomic_read(li->cpuflags) & CPUSTAT_RUNNING) { 254 if (!(atomic_read(li->cpuflags) & CPUSTAT_STOPPED)) {
255 rc = 1; /* incorrect state */ 255 rc = 1; /* incorrect state */
256 *reg &= SIGP_STAT_INCORRECT_STATE; 256 *reg &= SIGP_STAT_INCORRECT_STATE;
257 kfree(inti); 257 kfree(inti);