[PULL,15/15] s390x: sigp: Fix sense running reporting
diff mbox series

Message ID 20200127122016.18752-16-cohuck@redhat.com
State New
Headers show
Series
  • [PULL,01/15] s390x/sclp.c: remove unneeded label in sclp_service_call()
Related show

Commit Message

Cornelia Huck Jan. 27, 2020, 12:20 p.m. UTC
From: Janosch Frank <frankja@linux.ibm.com>

The logic was inverted and reported running if the cpu was stopped.
Let's fix that.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Fixes: d1b468bc8869 ("s390x/tcg: implement SIGP SENSE RUNNING STATUS")
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20200124134818.9981-1-frankja@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 target/s390x/sigp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/target/s390x/sigp.c b/target/s390x/sigp.c
index 727875bb4ab9..c604f177100f 100644
--- a/target/s390x/sigp.c
+++ b/target/s390x/sigp.c
@@ -348,9 +348,9 @@  static void sigp_sense_running(S390CPU *dst_cpu, SigpInfo *si)
 
     /* If halted (which includes also STOPPED), it is not running */
     if (CPU(dst_cpu)->halted) {
-        si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;
-    } else {
         set_sigp_status(si, SIGP_STAT_NOT_RUNNING);
+    } else {
+        si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;
     }
 }