From patchwork Thu Sep 22 16:35:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 608254 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp506819pvb; Thu, 22 Sep 2022 11:37:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7TwYhnMLdCxtp4/sfjKSYDI5jhQCRz8IU19RWb1YLCNyNK5J48l4ybpE1G7KkclU/mCCn+ X-Received: by 2002:a05:620a:2844:b0:6b8:8cc3:9387 with SMTP id h4-20020a05620a284400b006b88cc39387mr3215221qkp.615.1663871848191; Thu, 22 Sep 2022 11:37:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663871848; cv=none; d=google.com; s=arc-20160816; b=G3b2W3G7dkjSKcSOPNPMtbF6nK6QVrRZWFwMry/AFT5PEvNvJxhMUPP+XM3zaO4zJf /6bi4blxNicrxaStU9j6p5YHqbnIdkWqTKdaKBeV3tVSbhRzfzIjhSgvrdiQ5iFc0iww NsFMFfoaSWd7rQdYIC7uGR7uFP982610u1sXaxmw+O85v9FInTIfZNsPnzUXYAptyS8C 2ljxaG4PChKGFdysOeQsX2plQ2gUm+j0ltFnshK8BVoceOlhkGlrGlHCTTUxzxA6z02Y cmRCkY/eTWdyoBY3dAxPK8vQVj0J0A9ZMGde667TPfS6MHT88X4pKGjRA4FZUhrFtvH6 F2rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=1rDY2/LSnTUCTndHvs7H1iIVK1L+jcasQz21+xSz1h0=; b=hQJii25WxA2fn7HoDAf6VATAHrmEvXvjwZ6P1E+YHd7913Y6KyYaWclu3RUvNeLhuC 0KlLIoj8XNpRxGgJ3QbiwJY+IIwaCYuQbhQjX0RFtsCGfuhbNpVye8w8s5oFdlnbuXfJ TR6ERobQ343Gup12pNd7zN/ZVy6Bd2O5aaT9HyQd/lFm827b9dX9lM5giwKi9jOnijLa e2PfJ80lqkI7E3D7ri5v0H0CgtZGBrDUgA75lNX8DRYU3mmpSK1fWL16pklOuCUKrpmz EddYa4unS1zLcVKNwElffPBp1c4RB9iQ4PD6n8gak/o8oNAt97LB/JgIIA8US9Bd+k2B /95g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="a/+ZIOel"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s8-20020a05620a254800b006ced38dcf67si999900qko.122.2022.09.22.11.37.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Sep 2022 11:37:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="a/+ZIOel"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:51912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obR4h-0004F5-KD for patch@linaro.org; Thu, 22 Sep 2022 14:37:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obPB9-0002CF-1S for qemu-devel@nongnu.org; Thu, 22 Sep 2022 12:36:10 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:38707) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1obPB2-0005Qb-45 for qemu-devel@nongnu.org; Thu, 22 Sep 2022 12:35:53 -0400 Received: by mail-wr1-x432.google.com with SMTP id n15so9518379wrq.5 for ; Thu, 22 Sep 2022 09:35:51 -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:to:from:from:to:cc:subject:date; bh=1rDY2/LSnTUCTndHvs7H1iIVK1L+jcasQz21+xSz1h0=; b=a/+ZIOel66wrCbEc8p5P3CfiCUfnDlH6dgl330A94JAxbs+f1gdYVjI/vE1SOJY3vZ 3Q9wE8KU85h8PJPdNRlej3+wWozVZKhYoDuvQHQNM4Naxx+DItNnD6bg3RJ+nRfypmlN HopO+eYecWGVuYrscNgyD5aErMlOK1nmt2j6GR4YOeHXqe1HZM93jsBfAIhvQyYes5AB 5SwAHsHXYt0lRW1m0Wud9aTTQ/vrII6h9eCj9GN5xZ9SbnffCZCVrn47bcNLcxC7Wfcd 4fmhwit+gJkcIVzQYDNwvdWusvHaTBeRVmKZA1Bfcs4IyNK3FQYg9Ygdx45B8VjOq5AH 1D4g== 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:to:from:x-gm-message-state:from:to:cc :subject:date; bh=1rDY2/LSnTUCTndHvs7H1iIVK1L+jcasQz21+xSz1h0=; b=NdQAY+ULghI8xEz4u8sJJbA1OSSrO8xfKyy9PUD9HapuJ7nWWeXMBpaKTzYId4zlTN i5TnQfKwmHEo7eExi58T+gnDPw8lk3sF5AKdxbiHXuhtdhnMuo780e6jqv6Pq2axthDG FfJT+o2sLiiEkOeJmOPwgzH/pTlthCVF3GxhtNGma8gfDKWIabTOqiqAzLYT6ndIHbcd xrjAbIXxS4M+AacLyELlOjfHSNlc8w0/pR5QEXbLf9mF/lwE+YQjpJEWkB4nLozhsveC f8vXHl7GF+zsRz8aBrnPiLC9ilN79lXEMiCVq2eGRpJisD87+o8xuveEpYQkCOqy7SMN tUaA== X-Gm-Message-State: ACrzQf0amay8ltyO1RNJyKt/Ufd2BVcruU6Id0KEyb+hMBPdVXlQtBUd oKIs7GnLgP9YYiU9elF3QO3lyC82GnxelQ== X-Received: by 2002:adf:d84f:0:b0:226:d37a:b2c4 with SMTP id k15-20020adfd84f000000b00226d37ab2c4mr2705460wrl.42.1663864550518; Thu, 22 Sep 2022 09:35:50 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id iw1-20020a05600c54c100b003b3401f1e24sm6452599wmb.28.2022.09.22.09.35.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 09:35:50 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 18/39] target/arm: Add secure parameter to get_phys_addr_pmsav7 Date: Thu, 22 Sep 2022 17:35:15 +0100 Message-Id: <20220922163536.1096175-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220922163536.1096175-1-peter.maydell@linaro.org> References: <20220922163536.1096175-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x432.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=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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Remove the use of regime_is_secure from get_phys_addr_pmsav7, using the new parameter instead. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-19-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/ptw.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 9e1f60d10b4..1e81eefa47a 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -1510,12 +1510,11 @@ static bool pmsav7_use_background_region(ARMCPU *cpu, ARMMMUIdx mmu_idx, static bool get_phys_addr_pmsav7(CPUARMState *env, uint32_t address, MMUAccessType access_type, ARMMMUIdx mmu_idx, - GetPhysAddrResult *result, + bool secure, GetPhysAddrResult *result, ARMMMUFaultInfo *fi) { ARMCPU *cpu = env_archcpu(env); int n; - bool secure = regime_is_secure(env, mmu_idx); bool is_user = regime_is_user(env, mmu_idx); result->phys = address; @@ -2418,7 +2417,7 @@ bool get_phys_addr(CPUARMState *env, target_ulong address, } else if (arm_feature(env, ARM_FEATURE_V7)) { /* PMSAv7 */ ret = get_phys_addr_pmsav7(env, address, access_type, mmu_idx, - result, fi); + is_secure, result, fi); } else { /* Pre-v7 MPU */ ret = get_phys_addr_pmsav5(env, address, access_type, mmu_idx,