From nobody Sun Feb 8 20:52:31 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1631022318; cv=none; d=zohomail.com; s=zohoarc; b=eu/wEGXRtqAMq5GEB/md7gid7H6YIzn3Itjd1zWytLZKW/cJr7CC2BTMtifPYD9XVhdrYydEH/MbiPAglhb7KpIRW7JIcIs+3/VJpe/0urZh6sav7EVMWrQJHIjalMPUL/5y60Vbku1Dm0qzV0dt408luFNSiDMUze/AJ3SI8pE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631022318; h=Content-Type: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; bh=IvV6nEVbiIc1PJLQDa/7CVFhHsA7w/2ifB/3BOUZ6b0=; b=f+c/CSacT6ReMyUh0p/jh5c7ARiDvfOGCUlxHNXn3UZ7heHbb+7IV/GnR/5FBxLrWKJUpMPXklmKDXiksW0vHfxP1ad8TgmOLZgeMZ0B333wf4s7EnTBl42Ct726qpYADViodHffp2AiN/Wlkl/YCSzK2VLhfQG7bIusWtW5ccY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1631022318791489.25980573013476; Tue, 7 Sep 2021 06:45:18 -0700 (PDT) Received: from localhost ([::1]:56654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNbPZ-0000kk-FY for importer@patchew.org; Tue, 07 Sep 2021 09:45:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNawp-0003HY-6W for qemu-devel@nongnu.org; Tue, 07 Sep 2021 09:15:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:53431) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNawl-0002Ud-Ig for qemu-devel@nongnu.org; Tue, 07 Sep 2021 09:15:34 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-96-J5wLMFHqPKSv1zWUz4xgrg-1; Tue, 07 Sep 2021 09:15:21 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A9C52107ACED; Tue, 7 Sep 2021 13:15:20 +0000 (UTC) Received: from thuth.com (unknown [10.39.194.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 67B8D5C1B4; Tue, 7 Sep 2021 13:15:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631020525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IvV6nEVbiIc1PJLQDa/7CVFhHsA7w/2ifB/3BOUZ6b0=; b=L4BkRdJIkBoIbSs661W1D1hHPH4nmm0AlmaOMwDUI/qhYj9jAQp/4SClf7gKgKscwaVihv SSJp6zd2y8oPUjIM6pJ/42fWTvAzvGDSVRBZnl515uu4Ox9FM4CQSpZqR+a7L2k00DPD2I /WM5QEMsX+1Ob1ye0u9gWYJHIWB4+cA= X-MC-Unique: J5wLMFHqPKSv1zWUz4xgrg-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL 06/20] s390x/tcg: wrap address for RRBE Date: Tue, 7 Sep 2021 15:14:35 +0200 Message-Id: <20210907131449.493875-7-thuth@redhat.com> In-Reply-To: <20210907131449.493875-1-thuth@redhat.com> References: <20210907131449.493875-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.391, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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: qemu-s390x@nongnu.org, David Hildenbrand Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1631022321215100001 Content-Type: text/plain; charset="utf-8" From: David Hildenbrand Let's wrap the address just like for SSKE and ISKE. Signed-off-by: David Hildenbrand Reviewed-by: Thomas Huth Message-Id: <20210903155514.44772-2-david@redhat.com> Signed-off-by: Thomas Huth --- target/s390x/tcg/mem_helper.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index 21a4de4067..e0befd0f03 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -2223,11 +2223,12 @@ void HELPER(sske)(CPUS390XState *env, uint64_t r1, = uint64_t r2) uint32_t HELPER(rrbe)(CPUS390XState *env, uint64_t r2) { MachineState *ms =3D MACHINE(qdev_get_machine()); + uint64_t addr =3D wrap_address(env, r2); static S390SKeysState *ss; static S390SKeysClass *skeyclass; uint8_t re, key; =20 - if (r2 > ms->ram_size) { + if (addr > ms->ram_size) { return 0; } =20 @@ -2236,14 +2237,14 @@ uint32_t HELPER(rrbe)(CPUS390XState *env, uint64_t = r2) skeyclass =3D S390_SKEYS_GET_CLASS(ss); } =20 - if (skeyclass->get_skeys(ss, r2 / TARGET_PAGE_SIZE, 1, &key)) { + if (skeyclass->get_skeys(ss, addr / TARGET_PAGE_SIZE, 1, &key)) { return 0; } =20 re =3D key & (SK_R | SK_C); key &=3D ~SK_R; =20 - if (skeyclass->set_skeys(ss, r2 / TARGET_PAGE_SIZE, 1, &key)) { + if (skeyclass->set_skeys(ss, addr / TARGET_PAGE_SIZE, 1, &key)) { return 0; } /* --=20 2.27.0