902636
From cd7da3cf1b19fef0a497fd556562040a85e579a7 Mon Sep 17 00:00:00 2001
902636
From: Thomas Huth <thuth@redhat.com>
902636
Date: Fri, 29 May 2020 05:53:57 -0400
902636
Subject: [PATCH 15/42] s390/sclp: improve special wait psw logic
902636
MIME-Version: 1.0
902636
Content-Type: text/plain; charset=UTF-8
902636
Content-Transfer-Encoding: 8bit
902636
902636
RH-Author: Thomas Huth <thuth@redhat.com>
902636
Message-id: <20200529055420.16855-16-thuth@redhat.com>
902636
Patchwork-id: 97037
902636
O-Subject: [RHEL-8.3.0 qemu-kvm PATCH v2 15/38] s390/sclp: improve special wait psw logic
902636
Bugzilla: 1828317
902636
RH-Acked-by: Claudio Imbrenda <cimbrend@redhat.com>
902636
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
902636
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
902636
RH-Acked-by: David Hildenbrand <david@redhat.com>
902636
902636
From: Christian Borntraeger <borntraeger@de.ibm.com>
902636
902636
There is a special quiesce PSW that we check for "shutdown". Otherwise disabled
902636
wait is detected as "crashed". Architecturally we must only check PSW bits
902636
116-127. Fix this.
902636
902636
Cc: qemu-stable@nongnu.org
902636
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
902636
Message-Id: <1582204582-22995-1-git-send-email-borntraeger@de.ibm.com>
902636
Reviewed-by: David Hildenbrand <david@redhat.com>
902636
Acked-by: Janosch Frank <frankja@linux.ibm.com>
902636
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
902636
(cherry picked from commit 8b51c0961cc13e55b26bb6665ec3a341abdc7658)
902636
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
902636
---
902636
 target/s390x/helper.c | 2 +-
902636
 1 file changed, 1 insertion(+), 1 deletion(-)
902636
902636
diff --git a/target/s390x/helper.c b/target/s390x/helper.c
902636
index a3a49164e4..6808dfda01 100644
902636
--- a/target/s390x/helper.c
902636
+++ b/target/s390x/helper.c
902636
@@ -89,7 +89,7 @@ hwaddr s390_cpu_get_phys_addr_debug(CPUState *cs, vaddr vaddr)
902636
 static inline bool is_special_wait_psw(uint64_t psw_addr)
902636
 {
902636
     /* signal quiesce */
902636
-    return psw_addr == 0xfffUL;
902636
+    return (psw_addr & 0xfffUL) == 0xfffUL;
902636
 }
902636
 
902636
 void s390_handle_wait(S390CPU *cpu)
902636
-- 
902636
2.27.0
902636