From patchwork Mon Aug 22 15:26:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 599139 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp1785145mae; Mon, 22 Aug 2022 09:15:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR4kdZyau3fg2z4fqQqLnvPaX5aFGSpnHGxNLL2yu/g2RCT2Llsx9bImAwNbEWv3L30ACBMr X-Received: by 2002:a05:622a:54c:b0:343:5a1a:9ace with SMTP id m12-20020a05622a054c00b003435a1a9acemr15886473qtx.546.1661184934365; Mon, 22 Aug 2022 09:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661184934; cv=none; d=google.com; s=arc-20160816; b=Zj+t2fcBAVCtQ85qZzemBNeG1AhQBVBk57tlCG2gWltxgnlkZ0Lmch3u5Bdg54Yq36 3JEid/ywKxZ5rAHm5rYGJ/F2hRIE27k2RRv+zYf9yMIczzLbREUTueZVDlCoRuY0XIVV iwhRw2cV56FKJn1tfGsZOJ3lek1UiyBU5f70mxZhTYwjjCkdv05hfl/wgE2rV69lX0BC TTNVPLexYXLzxo8bFgDl+T5EQJ1crB4LjSq5B1FyX9u9QjqrwUzHb0amzmS3mJiM6Ubd O9gKZf+XjSglDrLx/fA7k6xwRhzM9Eo8nE1h1cr/LPKbs2W/i3zom6FR/X8F1QeDYFRR xy0Q== 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:cc:to :from:dkim-signature; bh=GSDRuelmXHTBnV2ZkAtPbMvnakhm9Yy5oZigW0sA2/o=; b=dQdsLvRXGSfYTGfuzSx0ez6ZScFxZI0BhwYYseMAkYMSAmMUtN+A50bs4p5ETWH/ku TOd4p4EyE3hsWuN1SBOQ/8qOdscA/8b1u2i2zvJn4YYNMCOWuQZdD9U2WZTBiU5dVZAn SlZ8mqobd6Oh86wB3SE9blbHOW8oDVNjbMfZTLHXtI6nxSW6O29rYI/rG0IR8U5vNwfG aKK/KYNJ6WTq8/Nshlu4vFraNTVgEg30cf8GKvNuxtoqn+81Fidr5I2BJZNGYPi8wgOj l2r1EkZ67wCzQrRBbrcWv+upV72ai62wcHeHlCxn6B0ou0EYrD35cPt6v7jDOjgG1ZXM QdPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cHY4ia1P; 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 3-20020ad45b83000000b00496db7af528si1889439qvp.273.2022.08.22.09.15.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Aug 2022 09:15:34 -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=cHY4ia1P; 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]:58654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQA5M-0008G1-NQ for patch@linaro.org; Mon, 22 Aug 2022 12:15:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQ9LQ-0007gY-7e for qemu-devel@nongnu.org; Mon, 22 Aug 2022 11:28:04 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:42644) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQ9LI-0000j5-Cp for qemu-devel@nongnu.org; Mon, 22 Aug 2022 11:28:03 -0400 Received: by mail-pj1-x102b.google.com with SMTP id s3-20020a17090a2f0300b001facfc6fdbcso10989455pjd.1 for ; Mon, 22 Aug 2022 08:27:55 -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=GSDRuelmXHTBnV2ZkAtPbMvnakhm9Yy5oZigW0sA2/o=; b=cHY4ia1PZSpVvJpUxvTTZbwuO2D/HWRflpj0x13V4BecdfuMBpgylaFlqOAQI/8ZnD IYwmpO2jIThSBmZF/tnFxk6c/L+28IUZXkMVkaEg8UuBQAlCOfwjHkOK0WKC/+YK9uck mlVpdn9IIZpj4I4szremlgvWVUbNr3mv+euxyoyFbZ3VefTXwBdJgaBq/Ng84PSK9xFX t3LkcgrzUHzb5Anoky24lm7sQez2DleJ+rNCdXTQz4Blsa1ezTznyfx1uDsCmSz6SmJK SO+1X7TmsVI7S3KJsecg8mji9pkNa2Kn2S8KzSmJ9IOnJkwxOsRgYEuKfpPSf9M+du6h xO6w== 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=GSDRuelmXHTBnV2ZkAtPbMvnakhm9Yy5oZigW0sA2/o=; b=mEI3aQX/L7vW9092s+dlcEf0JJQqSNCCwD4JfO7leG3DzgImv2avXNdcTVVOi7nmBT rzTGaPnWaIp7NX3AOUgKaW7w7/e66sq479huEbEuig/fAfYjhVLWKIaiAfMpbuhQQYeL 125z2VRzyU84ohdCnOVt9/WtYP3tl+k4upNZoFq5flgsRoEXLbUf8flV6op0HGdPx2bm jPEUjJexK76SXWveXybpIbP8+G8c6FOmUSHDsXWldalQOEcHzQJGbNW2QAVYxvNT/Ps3 wg5flx4kcnfTVqI1zJNzt8Fjs2bgYi4+a03TJIw0yEEnm3zz3VcklnvVfkr7a1dciTR9 4jVw== X-Gm-Message-State: ACgBeo3fqYM/U9XNfEOHROLAcKRoH+PWM3suj2/ybKGR6Mac2b5+8ewD rm5ipKGYltwRspbYrTmIC2x6ayU9plSY6A== X-Received: by 2002:a17:902:a511:b0:172:97a7:6f5d with SMTP id s17-20020a170902a51100b0017297a76f5dmr20720936plq.159.1661182074999; 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.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Aug 2022 08:27:54 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v2 15/66] target/arm: Add secure parameter to get_phys_addr_pmsav8 Date: Mon, 22 Aug 2022 08:26:50 -0700 Message-Id: <20220822152741.1617527-16-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 Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Remove the use of regime_is_secure from get_phys_addr_pmsav8. Since we already had a local variable named secure, use that. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Reviewed-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 a6880d051b..fccac2d71f 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -1963,10 +1963,9 @@ void v8m_security_lookup(CPUARMState *env, uint32_t address, static bool get_phys_addr_pmsav8(CPUARMState *env, uint32_t address, MMUAccessType access_type, ARMMMUIdx mmu_idx, - GetPhysAddrResult *result, + bool secure, GetPhysAddrResult *result, ARMMMUFaultInfo *fi) { - uint32_t secure = regime_is_secure(env, mmu_idx); V8M_SAttributes sattrs = {}; bool ret; @@ -2411,7 +2410,7 @@ bool get_phys_addr(CPUARMState *env, target_ulong address, if (arm_feature(env, ARM_FEATURE_V8)) { /* PMSAv8 */ ret = get_phys_addr_pmsav8(env, address, access_type, mmu_idx, - result, fi); + is_secure, result, fi); } else if (arm_feature(env, ARM_FEATURE_V7)) { /* PMSAv7 */ ret = get_phys_addr_pmsav7(env, address, access_type, mmu_idx,