From nobody Sat May 4 08:06:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=de.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1582204947; cv=none; d=zohomail.com; s=zohoarc; b=BW1SswY0V5MRI+tL64JrSRwV3NAOpgaVEd2Z3L/yRgBwh5rH4uXyQWsdE8+J8jx98OMlDZ93frKVA2Lg0iUuysrPe6o4wpDuPQqcRyGW78kdTY6UOpI86pJxEpXE5IktKbftR1/jMOtESe7DNy57tSqciknYDFrLas+KlNqfG0Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582204947; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To; bh=2UdUzRym/8bUdMozJ44Zt3H+KNqVpmFenf/CN8PIdjE=; b=lmt5a2kFRKKTFMRbuVnpBxqJbVHLyc/a+PJs7n//pttfmfGIZy4voYKTxylCQd5GslKLTsiWd/GtnjIFBinpvSrh3MyRZwoLAysg4YQqMA4mayCaEBXmQGjsuC0l2OWKZgNgTTTCvYF47JZD5FG4dr4az+FfE3K8iaxsm3JbXTE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582204947814421.5476083044082; Thu, 20 Feb 2020 05:22:27 -0800 (PST) Received: from localhost ([::1]:42072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4lmc-0007Yt-Pn for importer@patchew.org; Thu, 20 Feb 2020 08:22:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58518) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4lh4-0008Ez-Vg for qemu-devel@nongnu.org; Thu, 20 Feb 2020 08:16:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4lh3-00024h-Ud for qemu-devel@nongnu.org; Thu, 20 Feb 2020 08:16:42 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55186) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j4lh3-000232-Mv; Thu, 20 Feb 2020 08:16:41 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01KDE0O4036958; Thu, 20 Feb 2020 08:16:39 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y99pftrxr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Feb 2020 08:16:39 -0500 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 01KDF0NQ070482; Thu, 20 Feb 2020 08:16:39 -0500 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y99pftrww-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Feb 2020 08:16:38 -0500 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 01KDFUEW022132; Thu, 20 Feb 2020 13:16:37 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma01dal.us.ibm.com with ESMTP id 2y68978232-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Feb 2020 13:16:37 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 01KDGa3H31654346 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Feb 2020 13:16:36 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8D5F17805E; Thu, 20 Feb 2020 13:16:36 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C84137805C; Thu, 20 Feb 2020 13:16:34 +0000 (GMT) Received: from oc7455500831.ibm.com (unknown [9.145.146.44]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 20 Feb 2020 13:16:34 +0000 (GMT) From: Christian Borntraeger To: Cornelia Huck Subject: [PATCH] s390/sclp: improve special wait psw logic Date: Thu, 20 Feb 2020 14:16:22 +0100 Message-Id: <1582204582-22995-1-git-send-email-borntraeger@de.ibm.com> X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572 definitions=2020-02-20_04:2020-02-19, 2020-02-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 mlxscore=0 phishscore=0 clxscore=1011 bulkscore=0 impostorscore=0 malwarescore=0 adultscore=0 spamscore=0 mlxlogscore=900 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002200100 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.156.1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Janosch Frank , David Hildenbrand , qemu-devel , qemu-stable@nongnu.org, Christian Borntraeger , qemu-s390x , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" There is a special quiesce PSW that we check for "shutdown". Otherwise disa= bled wait is detected as "crashed". Architecturally we must only check PSW bits 116-127. Fix this. Cc: qemu-stable@nongnu.org Signed-off-by: Christian Borntraeger Acked-by: Janosch Frank Reviewed-by: David Hildenbrand --- target/s390x/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/helper.c b/target/s390x/helper.c index a3a4916..6808dfd 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -89,7 +89,7 @@ hwaddr s390_cpu_get_phys_addr_debug(CPUState *cs, vaddr v= addr) static inline bool is_special_wait_psw(uint64_t psw_addr) { /* signal quiesce */ - return psw_addr =3D=3D 0xfffUL; + return (psw_addr & 0xfffUL) =3D=3D 0xfffUL; } =20 void s390_handle_wait(S390CPU *cpu) --=20 1.8.3.1