From nobody Mon Feb 9 20:59:19 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791390; cv=none; d=zohomail.com; s=zohoarc; b=I+djIXIbrNvfLmZQ989hJndJVELyIfS5yxyc4g0XaASZdyf+80pmQ2VRWpoknhuZwQkOO5tEz6eJtr/mN9sCy01jRUeVi+GNQz60L1pGF2m9jhu4MxS/wSngqIij+rosA/pJF91NWR51DXXzQktnWym2Ew6v0as3vzBvuLDhbg8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791390; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=r471lAfTDSZ91X7dNYg/GCwvgvHUQzpWa5sedZ2e7kw=; b=b/2t0fDu1BY6B/LTwWtCDyqRWCuUGfX0MROMdPQLUFX5MzhBa4byYATrzT2FEzLmaRSpzBV1NfOe8l5Go2lN9m3vpvMvd/A2hSmCvwUj6cxyPxncU0dDNAgHQJ3bu32NaxI+QMmMvCtnzG6gAK7AC2PPeXdJgr4MZRXgQIGgCgg= 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 1767791390130615.8974553515479; Wed, 7 Jan 2026 05:09:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTH6-0000Zl-Tm; Wed, 07 Jan 2026 08:08:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTH2-0000Rs-Sq for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:08:29 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTH1-0008NV-8t for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:08:28 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-47d3ffa6720so20601215e9.0 for ; Wed, 07 Jan 2026 05:08:25 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d870c73c0sm12290385e9.3.2026.01.07.05.08.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:08:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791304; x=1768396104; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=r471lAfTDSZ91X7dNYg/GCwvgvHUQzpWa5sedZ2e7kw=; b=AE2zye6oldubKCtFwotsLOjfRWF416vBzIzA9qfn3F2EqVeWGlsU2FKaXEBO/lgFqT 063LLqeryLdQQgSGNrTFP8LBleTxM5p0stLUFcy68nK5yQZR1s5MfVsQCHhOJw/TAz5C b1BQ0a7Ub9QRkHoHCGzOODFs7fKDhxWVMliIvIrbSM2bPZjMPlFSvPwEsjeyz55B7gNx q15u7jGd21X0ejopO1Arliubt+hTswts4Yf39sh4FlRgurhkeS+mDb7+V2EcrCVSBiys q4y6SshWISC1j9cCdYQ4/4YjxQerTB336yMdmBvXx3eJyDRAP3oV59QLmszZpGhSjv6G i5Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791304; x=1768396104; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=r471lAfTDSZ91X7dNYg/GCwvgvHUQzpWa5sedZ2e7kw=; b=Jp8RcxaQlEk9r3Zu2PxhjA6eCVx0CIlqnav1CyervsVxwOJEKk8+2Y93s2L0z0TSQ8 SGnRTs/Xt1L3DVJkpG5t80JhohXIDcsRQETMk32gSv/5+GCI4/7ijgSKJsrqfOgrz3wQ Hk6aIwGSgnTOBFmo+XdRHjkliQtoHhB/0Gkkl7HlQRzAZ8CVCHAzMtiv19GwVN9p4fgh f8P4c/2C/bmjUqTTdvQbXS4Vd8dAoF2hVMwGW8AZq2fX1SvrnD1hqOTusucpq1uy41qn nzl5iKfGtUglst+wHItJu/AIqEGr4SPPBaJMr4pd+LSNOQsnTNM2j9/Zq2+MMp8RdatS 3rMg== X-Gm-Message-State: AOJu0YwRowlQpEhHK0j6XASTXdWINIPz+R/HYKP7bf27Ye8/XdFOkOkJ nIrCjRvbvoVxYuEptW2j0PEcZJeI4Oi26gtpl8QuVmc7FjJ1fVCJsDVVxptwFdZcgyas48f+sED sUXqbk84= X-Gm-Gg: AY/fxX6yAiIk9pu6HFyhI1m/5aUtLty3H5v1QTeiVLVHnrBvOAAuxx2mm02/KtGbCzC JhL3rYSlc+06MTduOYlKpd9rgzKGmMiigpj9rX9FlB9T2U8GBKrq0QAyfl4Fz9ascMKuNVa9HSA Z1Nw18zm345KC9r3bOIYAsp3NRJAbImCk/ZLYCPezIGY/hZ2GO3MoHepfAvg8+1wtI5YtphE8A5 mlaZbgURd93u5FfFbvg3kNK6W6OTSWlb+gOqfAuGSNbpx+39rGbalucZUW46ksnf6SYr5Uy0vrb cqGd2wWrJw/jy7dRKoC8ZqHnomX5RdKbvU9UC+5g1I/FXVE/3optuSHTSzx8ReoJQiZRbIxu+Mg 5TMGIptht/2vtS3RPvbJa9h2Z7PaPsljjqqwAFPf91byyJIHoXsRW03Foazvh4a0l8HPjgwlQ/L hk7QeFtRuFaYmbbXfWJpJOcSv3gs3XhhLjThoE0gq93ZbQ/uYG2ZiIgqI1A7XK X-Google-Smtp-Source: AGHT+IFTu5k2vopksPZlCcsh5XGMkkD94rOxcfoW9RpZOjoNo+DiCzfx5fh6rQeaN9C/ioNfhNCcQw== X-Received: by 2002:a05:600c:a317:b0:477:9976:9e1a with SMTP id 5b1f17b1804b1-47d85bf063cmr19527975e9.6.1767791303723; Wed, 07 Jan 2026 05:08:23 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Ilya Leoshkevich , David Hildenbrand Subject: [PATCH 02/18] target/s390x: Use address_space_ldl_be() in read_table_entry() Date: Wed, 7 Jan 2026 14:07:50 +0100 Message-ID: <20260107130807.69870-3-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 (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=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791392538158500 Keep address_space_read/write() API to access blob of memory. When the access size is known, use the address_space_ld/st() API which can directly swap endianness. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- target/s390x/mmu_helper.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index 026502a3e40..9ee1d778876 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -108,6 +108,7 @@ static inline bool read_table_entry(CPUS390XState *env,= hwaddr gaddr, uint64_t *entry) { CPUState *cs =3D env_cpu(env); + MemTxResult ret; =20 /* * According to the PoP, these table addresses are "unpredictably real @@ -116,13 +117,9 @@ static inline bool read_table_entry(CPUS390XState *env= , hwaddr gaddr, * * We treat them as absolute addresses and don't wrap them. */ - if (unlikely(address_space_read(cs->as, gaddr, MEMTXATTRS_UNSPECIFIED, - entry, sizeof(*entry)) !=3D - MEMTX_OK)) { - return false; - } - *entry =3D be64_to_cpu(*entry); - return true; + *entry =3D address_space_ldl_be(cs->as, gaddr, MEMTXATTRS_UNSPECIFIED,= &ret); + + return ret =3D=3D MEMTX_OK; } =20 static int mmu_translate_asce(CPUS390XState *env, target_ulong vaddr, --=20 2.52.0