yeahuh / rpms / qemu-kvm

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