Skip to contentSkip to conversation

s390x: sigp: Fix sense running reporting

PATCH Applied Janosch Frank 2 participants 2 messages Jan 24, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 s390x: sigp: Fix sense running reporting

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

Fixes d1b468bc8869 ("s390x/tcg: implement SIGP SENSE RUNNING STATUS")

---

Switched the actions instead of the condition so the comment still applies.

---
 target/s390x/sigp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
target/s390x/sigp.c +2 -2
index 727875bb4a..c604f17710 100644
@@ -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;
     }
 }
 
Signature · 1 line
2.20.1
#1 lore raw
Quoted 6 lines · On Fri, 24 Jan 2020 08:48:18 -0500 Janosch Frank <[email protected]> wrote:

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

Fixes d1b468bc8869 ("s390x/tcg: implement SIGP SENSE RUNNING STATUS")
Quoted 8 lines

---

Switched the actions instead of the condition so the comment still applies.

---
 target/s390x/sigp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Thanks, applied.