From nobody Tue Feb 10 17:46:11 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=1661183917; cv=none; d=zohomail.com; s=zohoarc; b=JJZFyTLSjiVp3xScEhinMFgTtm7V8PexviL2owXG3flQjmsA80wQ3dkKGQAe3ImSVxNvkMAfXAvi43+MzUKSz8+G4vfCRb5FSFc1B+kla9i+bVNDkFCloYJ4K5k8/NG6QtYsCIpq0ZyVCXpusORph+q9Ld7ddtFKzLeH9QBuECw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661183917; 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=1eh9DETdW0GbelT1RBsxHXY98fMacnuqD6EL7eauGgo=; b=b5TwE4nXrHa7WmIZlT0qHVKEgagHH59IK59OQled0k24rr4Vj0JCrFBSI2oN5ckQ18ZdzMdeohz3u/pxShN3/JJjJDaRDh7nNP5915kfgneFzEVK+UsFz8lSFNg6RTQuTB8ZoWTJBSE5k9WrTWylRV8E4nlBOQ8H6+0RzrgwMtM= 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 1661183917990762.7058432907626; Mon, 22 Aug 2022 08:58:37 -0700 (PDT) Received: from localhost ([::1]:47476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQ9ox-0006qp-UT for importer@patchew.org; Mon, 22 Aug 2022 11:58:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQ9LM-0007Vk-N3 for qemu-devel@nongnu.org; Mon, 22 Aug 2022 11:28:00 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:34374) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQ9LG-0000iG-OZ for qemu-devel@nongnu.org; Mon, 22 Aug 2022 11:28:00 -0400 Received: by mail-pl1-x632.google.com with SMTP id jl18so10251796plb.1 for ; Mon, 22 Aug 2022 08:27:54 -0700 (PDT) Received: from stoup.. ([71.212.157.236]) by smtp.gmail.com with ESMTPSA id q7-20020a17090311c700b0016bffc59718sm8665222plh.58.2022.08.22.08.27.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Aug 2022 08:27:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=1eh9DETdW0GbelT1RBsxHXY98fMacnuqD6EL7eauGgo=; b=uh4Mnjf1Tj+JoUM49nZJOdbZYwEzSE4XOAJOFM41uoIBywpVKK/exeLo8jOe6skHvu i36lc9g8D4KhQzmo/1ZNbDL+brtcxOig2A2vi3SsEiHiiB6snnwaMQyrfE1b0CcW+ID7 GcY9pN+vFTSXBYe8AVfvtXlGFFh0k5zPplAsCuMQttK+ZluAFA8dyRY1skHe4Ns5r8c6 PzHsVi6Ss+IxbVMSAJAfaxvymEmjzi9YHby5ioPYPSFkGDrUZcJDf9s26WPch5pPz8A+ TBMZnSZsyh198fapgEb1yEE2cwL6NoqRAoSqdHfr3F1MqBwCYbUqSM6aG3HXEQrsYKxt QtLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=1eh9DETdW0GbelT1RBsxHXY98fMacnuqD6EL7eauGgo=; b=k7S2ub+mQkKdXSWg88IwmG4S2E1A0FwJxDlIZbi32ohvgCv8caatRariTcILFsZoaN jRXe7LsXhwAUYsKHMSOKuuk4/oWFZkL4ReGrP30PuKGtQI25DCCNR4rReb1kMR0bb0wI R9tQe/ursDsNRx/w+rl0cJsTSDx1WDGMgLrj+mnaPoFY9qg2GyVQetNzrLzr7mH5BHyS FmwkBJZkAUwStdhzhsNc1JJ2jneCEgvRY9aW4Th7G6r6SzofEH9UF4YaHS/sO2yaK0C+ 6fYZ8zjyFmI9E6fsloS3rp38qqE6rsOw+5CMgA/NGzjhRv3D/PHdSvb5hqXGBjHxDSN+ Nppw== X-Gm-Message-State: ACgBeo2KvKZ2RWpVHxssfbC0Ef/n+lzzC07/Hd8QLU4JUDzlc+ZMnhKZ ldQfvA4MuvgAtWUvj6q9pthrTUenruoNWw== X-Google-Smtp-Source: AA6agR7AVDO+glixXjDV2C+oRmQe/mMbmMIZpxCh5XFb5Rf85NI1VvTYUITWJfUlXZ+XoOiWBCq8Ug== X-Received: by 2002:a17:902:d48f:b0:16f:a73:bf04 with SMTP id c15-20020a170902d48f00b0016f0a73bf04mr20911488plg.43.1661182073118; Mon, 22 Aug 2022 08:27:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 13/66] target/arm: Add is_secure parameter to get_phys_addr_v5 Date: Mon, 22 Aug 2022 08:26:48 -0700 Message-Id: <20220822152741.1617527-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220822152741.1617527-1-richard.henderson@linaro.org> References: <20220822152741.1617527-1-richard.henderson@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 client-ip=2607:f8b0:4864:20::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1661183918356100001 Remove the use of regime_is_secure from get_phys_addr_v5, passing the new parameter to the lookup instead. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/ptw.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 5628581ddc..4609278b42 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -414,7 +414,8 @@ static int simple_ap_to_rw_prot(CPUARMState *env, ARMMM= UIdx mmu_idx, int ap) =20 static bool get_phys_addr_v5(CPUARMState *env, uint32_t address, MMUAccessType access_type, ARMMMUIdx mmu_idx, - GetPhysAddrResult *result, ARMMMUFaultInfo *f= i) + bool is_secure, GetPhysAddrResult *result, + ARMMMUFaultInfo *fi) { int level =3D 1; uint32_t table; @@ -433,8 +434,7 @@ static bool get_phys_addr_v5(CPUARMState *env, uint32_t= address, fi->type =3D ARMFault_Translation; goto do_fault; } - desc =3D arm_ldl_ptw(env, table, regime_is_secure(env, mmu_idx), - mmu_idx, fi); + desc =3D arm_ldl_ptw(env, table, is_secure, mmu_idx, fi); if (fi->type !=3D ARMFault_None) { goto do_fault; } @@ -472,8 +472,7 @@ static bool get_phys_addr_v5(CPUARMState *env, uint32_t= address, /* Fine pagetable. */ table =3D (desc & 0xfffff000) | ((address >> 8) & 0xffc); } - desc =3D arm_ldl_ptw(env, table, regime_is_secure(env, mmu_idx), - mmu_idx, fi); + desc =3D arm_ldl_ptw(env, table, is_secure, mmu_idx, fi); if (fi->type !=3D ARMFault_None) { goto do_fault; } @@ -2512,7 +2511,7 @@ bool get_phys_addr(CPUARMState *env, target_ulong add= ress, result, fi); } else { return get_phys_addr_v5(env, address, access_type, mmu_idx, - result, fi); + is_secure, result, fi); } } =20 --=20 2.34.1