From patchwork Mon Jul 23 20:16:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 10540993 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D492B91E for ; Mon, 23 Jul 2018 21:08:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3C89284DC for ; Mon, 23 Jul 2018 21:08:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7E3C284F0; Mon, 23 Jul 2018 21:08:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 507B2284DC for ; Mon, 23 Jul 2018 21:08:25 +0000 (UTC) Received: from localhost ([::1]:36641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhi48-0004DF-G5 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Jul 2018 17:08:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhhK2-0003Fk-Pa for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:20:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhhK0-0004vg-2r for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:20:46 -0400 Received: from mail-oi0-x244.google.com ([2607:f8b0:4003:c06::244]:38121) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhhJz-0004vQ-TL; Mon, 23 Jul 2018 16:20:44 -0400 Received: by mail-oi0-x244.google.com with SMTP id v8-v6so3481528oie.5; Mon, 23 Jul 2018 13:20:43 -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=3t9mtqi73+A00bv4UrwjrhZij7lPYKpQi/9K5Jarv1E=; b=q2dLIU4OsDo0ufUbeHwpAv+QWR574j18gmGmvrmb3w9VT2rS4JjGHb/Lei+Jl5i+A0 zzCDUO6f0g6QbMBenNXNbLhp3d1p5qIhLeHunObpAwDHhk1z6r8m0iDgfwXHhu8oFDzX jXIctC9IeRfa4s515AgiZU/HhF26KTq/Ma7rRqtTKP+dIVkQHWRADzZrHpLNESQWomH0 AzKRxjrLNI8zdERnv2SqoP7rWwk8pcuRtuKh2yqF6qbIRcBRO2n8Ri77KsJPlcKncDzZ at828f3sSa7PN8bckGi82NgpisWJxhWAhm2XKrUM+o00/U1G+WefeDhAfjXewfYeGMPQ PJ+w== 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=3t9mtqi73+A00bv4UrwjrhZij7lPYKpQi/9K5Jarv1E=; b=p9BhYeAj1LzphMLAoHDNxiiT/gvOx9bzDzVD7ImPHTDf6u0c4mfHswuUCdwe+kwWGK r4HEK+I463THbgDLxnV3o6dfUpbd93TTOCCCArx6O8cOQahunZ1Hc86fm0pI04ob4pOA zWpvaP1JyNwYePOI+Z8dQ7GPjUGlaCQeMQ1muQATo2ODPtF+xLtIIGtVJv+GYhR4a//c OIdt2KiFlv+k1rE/ntBZNPTrsDByXUGFtiEsxv59FvSPu65wmQdA6VGJQUiVrHaViNuI tZyJHaLa6JfqQEeFjWTO2jhOz6s6LSpkN3rX7aTJsTGehmrFShmVuDHKDd3bQn2y8VuD JApQ== X-Gm-Message-State: AOUpUlGn8ZbZuHqoWBf6Vd77NAzeQ4pk7Bny1jnDwcQLaDBAV3wbyQUr /vZ5X2SR59kIFb3qVPui57+2ee4vzH34ug== X-Google-Smtp-Source: AAOMgpdKVwzZpzNsGPOCHu406+kjS84MjvS03pWAS2ByCURONNZFoud8oBNPo1Bp3F/ngiDWt4yWFQ== X-Received: by 2002:aca:c7c2:: with SMTP id x185-v6mr289003oif.43.1532377242645; Mon, 23 Jul 2018 13:20:42 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id i204-v6sm19821348oia.41.2018.07.23.13.20.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jul 2018 13:20:41 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 23 Jul 2018 15:16:14 -0500 Message-Id: <20180723201748.25573-6-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> References: <20180723201748.25573-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 05/99] 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 5357a36d51..ded20c834e 100644 --- a/pc-bios/s390-ccw/iplb.h +++ b/pc-bios/s390-ccw/iplb.h @@ -101,10 +101,11 @@ static inline bool manage_iplb(IplParameterBlock *iplb, bool store) { register unsigned long addr asm("0") = (unsigned long) iplb; register unsigned long rc asm("1") = 0; + unsigned long subcode = store ? 6 : 5; asm volatile ("diag %0,%2,0x308\n" : "+d" (addr), "+d" (rc) - : "d" (store ? 6 : 5) + : "d" (subcode) : "memory", "cc"); return rc == 0x01; }