From nobody Sun Feb 8 19:39:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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 (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1565945473; cv=none; d=zoho.com; s=zohoarc; b=ioEukUvNNI7ew2QXvU+d31m2tde8JlHoqKxNyrUs9vlwP6eaVrOMA0WMNAC7AQwtjQWnWHFTnri30cAKa9Kt8mt54zxz2IMQUU3B3DLTB1vh8AewzaVAyrcQcba+nvwTWeZ+HcsaOaQ4ALbkwrqWx8MhsJMt7B2H72uVuOG55HY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565945473; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=MzEZnID9LgDpJra+qv6JZFWbw72tnwER17d3BjJWe14=; b=HCEFQohS0XT/j52JmZw1LKpj6OWMOeU7J/QdQSoyxgq/2N8Pkm58G3ZDN8HBeFLoAyXqu+glcH6goPHO8oxGE+yApB8m9yAE++vDXu8ErB6X68knq6gIoZDkdIIRmq3/v1EGeVwPim24AQLkVDtya03SA/8iPK/fM55FHikSEBA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1565945473240122.75829739024255; Fri, 16 Aug 2019 01:51:13 -0700 (PDT) Received: from localhost ([::1]:51928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyXx1-0003gS-Pz for importer@patchew.org; Fri, 16 Aug 2019 04:51:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52004) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyXtG-00071U-A3 for qemu-devel@nongnu.org; Fri, 16 Aug 2019 04:47:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hyXtF-0003tx-68 for qemu-devel@nongnu.org; Fri, 16 Aug 2019 04:47:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43386) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hyXtF-0003tR-0s; Fri, 16 Aug 2019 04:47:17 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 387C3369D3; Fri, 16 Aug 2019 08:47:16 +0000 (UTC) Received: from t460s.redhat.com (ovpn-116-249.ams2.redhat.com [10.36.116.249]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E621F6DF; Fri, 16 Aug 2019 08:47:14 +0000 (UTC) From: David Hildenbrand To: qemu-devel@nongnu.org Date: Fri, 16 Aug 2019 10:47:03 +0200 Message-Id: <20190816084708.602-2-david@redhat.com> In-Reply-To: <20190816084708.602-1-david@redhat.com> References: <20190816084708.602-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 16 Aug 2019 08:47:16 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 1/6] s390x/mmu: Trace the right value if setting/getting the storage key fails 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: Thomas Huth , Janosch Frank , David Hildenbrand , Cornelia Huck , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" We want to trace the actual return value, not "0". Fixes: 0f5f669147b5 (s390x: Enable new s390-storage-keys device) Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand --- target/s390x/mmu_helper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index 6e9c4d6151..b236196802 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -422,7 +422,8 @@ int mmu_translate(CPUS390XState *env, target_ulong vadd= r, int rw, uint64_t asc, *raddr =3D mmu_real2abs(env, *raddr); =20 if (r =3D=3D 0 && *raddr < ram_size) { - if (skeyclass->get_skeys(ss, *raddr / TARGET_PAGE_SIZE, 1, &key)) { + r =3D skeyclass->get_skeys(ss, *raddr / TARGET_PAGE_SIZE, 1, &key); + if (r) { trace_get_skeys_nonzero(r); return 0; } @@ -435,7 +436,8 @@ int mmu_translate(CPUS390XState *env, target_ulong vadd= r, int rw, uint64_t asc, key |=3D SK_C; } =20 - if (skeyclass->set_skeys(ss, *raddr / TARGET_PAGE_SIZE, 1, &key)) { + r =3D skeyclass->set_skeys(ss, *raddr / TARGET_PAGE_SIZE, 1, &key); + if (r) { trace_set_skeys_nonzero(r); return 0; } --=20 2.21.0