From nobody Mon Feb 9 23:01:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1529377258328622.7422232068974; Mon, 18 Jun 2018 20:00:58 -0700 (PDT) Received: from localhost ([::1]:38854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV6t7-0002GS-JT for importer@patchew.org; Mon, 18 Jun 2018 23:00:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV5j3-0002e5-6I for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:46:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fV5j1-0000Np-DJ for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:46:29 -0400 Received: from mail-oi0-x244.google.com ([2607:f8b0:4003:c06::244]:44565) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fV5j1-0000NY-7h; Mon, 18 Jun 2018 21:46:27 -0400 Received: by mail-oi0-x244.google.com with SMTP id c128-v6so16680060oig.11; Mon, 18 Jun 2018 18:46:27 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id a41-v6sm10863875otj.45.2018.06.18.18.46.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 18:46:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=aOrKmW2sd4tPob/8TzwsyM9R8BlFiVTlufQmA5RfQIE=; b=HLmmaqfVEJX4+LWhNmCeh9YdasRmuDTohTHKBPusKIZD8n7QGnesUcs/i6USJVaAyc fxNIpI+WdbbYoEYbkc5mOHf9VxcYcfQtQNSv8QP4Jxv7LgmJl/5BNMiu66zxqlfgg/NY GvLNDQjV3TFdxx7mUA8PSONifblq9rdtd80vBIDdhddSNeELII+14A8ZqalkZN9tE0lF F8Ua6KVC9ZPNvQkhWay6sooMfd/QEd7l/IIZbfuh9+D0b9sMbWDvfpDyik9K7Ec8Et+E Ox+sf2cYsLUWYD+lt/pwLCScW9sfyygqyU+jw46kAMkxow2ICw5Z6/DX/Brg9sdF1DKE hxZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=aOrKmW2sd4tPob/8TzwsyM9R8BlFiVTlufQmA5RfQIE=; b=BDDUbDz+/ORy1efpMtzTcRZSkBpLqXwsyRAmQ6Bv/AZxDgDum8tY90oYOJrFH9nFMX ehBqce3pYgMTtsUpJuVGgpTsqKfv7NMIgdJWxWkKQ5iN1lYTB5gBzD23GzIzFBPe2BqH Rv7bYvBJx9VJg5Rrj+Zn+Cf6NaaAjb3TSSSHkf4Qw/I9yeaa2d2yncszeFYVultfeDAc K2EvTE1OBa6iJulg/k/b0Vm7vq4/ULtP65mrBepFQ4gpCQ2kVZexb9YQRPUIK2zXulRd p9c6S+SFr5zDmRFaeq6i42tfSTIM/eNZhxNrkQ2VsLTCNFWfntCfuRiNXh5OeIPh+p68 tjcQ== X-Gm-Message-State: APt69E35MoGMKfDaPfOuaomD7TtO6NOS76SkhpQny2nJBM/QNuRb5ym6 kpAcEwjEOudwi14DrFn1228THmYR3z0= X-Google-Smtp-Source: ADUXVKKpVkMEKlfZmA6W9MPkv0i/AQIzeugBRewADYEiVaoLgwQ5Ck20CRASCyeb1d+lHlitZxHCEA== X-Received: by 2002:aca:61c5:: with SMTP id v188-v6mr8897866oib.28.1529372786072; Mon, 18 Jun 2018 18:46:26 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 18 Jun 2018 20:42:29 -0500 Message-Id: <20180619014319.28272-64-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> References: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::244 Subject: [Qemu-devel] [PATCH 063/113] s390-ccw: force diag 308 subcode to unsigned long X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Cornelia Huck , qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Cornelia Huck We currently pass an integer as the subcode parameter. However, the upper bits of the register containing the subcode need to be 0, which is not guaranteed unless we explicitly specify the subcode to be an unsigned long value. Fixes: d046c51dad3 ("pc-bios/s390-ccw: Get device address via diag 308/6") Cc: qemu-stable@nongnu.org Signed-off-by: Cornelia Huck Acked-by: Christian Borntraeger Tested-by: Thomas Huth Signed-off-by: Thomas Huth (cherry picked from commit 63d8b5ace31c1e1f3996fe4cd551d6d377594d5a) Signed-off-by: Michael Roth --- pc-bios/s390-ccw/iplb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pc-bios/s390-ccw/iplb.h b/pc-bios/s390-ccw/iplb.h index 40fc2d8e21..da0cab0102 100644 --- a/pc-bios/s390-ccw/iplb.h +++ b/pc-bios/s390-ccw/iplb.h @@ -81,10 +81,11 @@ static inline bool manage_iplb(IplParameterBlock *iplb,= bool store) { register unsigned long addr asm("0") =3D (unsigned long) iplb; register unsigned long rc asm("1") =3D 0; + unsigned long subcode =3D store ? 6 : 5; =20 asm volatile ("diag %0,%2,0x308\n" : "+d" (addr), "+d" (rc) - : "d" (store ? 6 : 5) + : "d" (subcode) : "memory", "cc"); return rc =3D=3D 0x01; } --=20 2.11.0