cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
8fced6
From a2befb24c10f58ce6c27d242f3b88afee1f77ec8 Mon Sep 17 00:00:00 2001
8fced6
From: Thomas Huth <thuth@redhat.com>
8fced6
Date: Tue, 7 Jul 2020 09:35:31 -0400
8fced6
Subject: [PATCH 2/4] s390x: sigp: Fix sense running reporting
8fced6
8fced6
RH-Author: Thomas Huth <thuth@redhat.com>
8fced6
Message-id: <20200707093532.22456-2-thuth@redhat.com>
8fced6
Patchwork-id: 97920
8fced6
O-Subject: [RHEL-8.3.0 qemu-kvm PATCH 1/2] s390x: sigp: Fix sense running reporting
8fced6
Bugzilla: 1854092
8fced6
RH-Acked-by: Jens Freimann <jfreimann@redhat.com>
8fced6
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
8fced6
RH-Acked-by: David Hildenbrand <david@redhat.com>
8fced6
8fced6
From: Janosch Frank <frankja@linux.ibm.com>
8fced6
8fced6
The logic was inverted and reported running if the cpu was stopped.
8fced6
Let's fix that.
8fced6
8fced6
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
8fced6
Fixes: d1b468bc8869 ("s390x/tcg: implement SIGP SENSE RUNNING STATUS")
8fced6
Reviewed-by: David Hildenbrand <david@redhat.com>
8fced6
Message-Id: <20200124134818.9981-1-frankja@linux.ibm.com>
8fced6
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
8fced6
(cherry picked from commit 4103500e2fa934a6995e4cedab37423e606715bf)
8fced6
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
8fced6
---
8fced6
 target/s390x/sigp.c | 4 ++--
8fced6
 1 file changed, 2 insertions(+), 2 deletions(-)
8fced6
8fced6
diff --git a/target/s390x/sigp.c b/target/s390x/sigp.c
8fced6
index 727875bb4a..c604f17710 100644
8fced6
--- a/target/s390x/sigp.c
8fced6
+++ b/target/s390x/sigp.c
8fced6
@@ -348,9 +348,9 @@ static void sigp_sense_running(S390CPU *dst_cpu, SigpInfo *si)
8fced6
 
8fced6
     /* If halted (which includes also STOPPED), it is not running */
8fced6
     if (CPU(dst_cpu)->halted) {
8fced6
-        si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;
8fced6
-    } else {
8fced6
         set_sigp_status(si, SIGP_STAT_NOT_RUNNING);
8fced6
+    } else {
8fced6
+        si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;
8fced6
     }
8fced6
 }
8fced6
 
8fced6
-- 
8fced6
2.27.0
8fced6