From patchwork Sat Oct 5 20:05:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 833000 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp1338881wra; Sat, 5 Oct 2024 13:08:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUPqVkX6uGq+Ho6eb04w30ZCDuuwzIAUUMEOaa/eBOhsLvYgNZMKGgQQAW3SNJW8+TuIXCIPQ==@linaro.org X-Google-Smtp-Source: AGHT+IEqMvyg0USWjIeFV+uqFQcOLcu9VPn9ShqqdnencNl5JKpO0YNFS/za4klb8tE4iWvQjsB0 X-Received: by 2002:a05:620a:1aa8:b0:7a9:b20d:cfe7 with SMTP id af79cd13be357-7ae6f444983mr1260055385a.15.1728158917160; Sat, 05 Oct 2024 13:08:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728158917; cv=none; d=google.com; s=arc-20240605; b=GkvVyTaB0sPFTf5fvTis1x8I5qQD61DRWVAYBL9UNe+pea2ZwB+Yl9OSt0m9Z19xUm kO+QNQuCuZ90d23tSoo8izsgdAN5EcsAi0jac2PaPfj1S94AO2wLlBR7DcJY1jYs76tz 1RDUJrsiR2oWAcoMjFggAm95HW3XMAZYlQTXF7rsQnkA0ftoLCJFfClJiqONv13/y7dn hlriiWusWinJ9sndBPevX8GiWclkCCWSi+fcrAUhgXTuSlIZVhx8IJ03uyHA3iPOC8iV 20xe5eqGyGVWHrl6eMrGxIND/JWCQywKgfANjr9sWdl2xJ/j5CWP2P4z6AFwBg2f+FIM e4Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=oB3S/z+Tf/YurYPbjZAkQ2iOmy2pkllXkguo9aONGm0=; fh=rQg8EQ8KH04w/0VkDYF6/ktgEyHJ2dqn1eatHCfBaLw=; b=a8dVl0geX+V8OSIsB7b36l6ayvENt50JOHdrmUeE5skL3LCP1vP06NVpgxnUPOSHPx RvFuL0iidDRVifBoN3brpfyuR2237IX8czF4Nsjd2JtnbEAvekcBcMhfD4Jyy4hPEBUv pJrXgAR7+5BYTz/OI7z7AzHe6rW61ovMGUMBV21/CTfWXSsPYeQWKjfxiF6PoOmOeHJa ugNq9oGLZOj7KX/mUKsYw9wJWVk8AUyJ5ttc5R+z6I2zWs0ZwVOMky0vxY1iHy7EYauc XvqjN+3neANml4EOspyi8hBcn7VhE1FDUyE5Q6w4XqgWKPqZQMWMiqAADlZ86LPrWZxT kf6Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z81JQxam; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7ae75661a67si276931285a.293.2024.10.05.13.08.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 Oct 2024 13:08:37 -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=Z81JQxam; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sxB2s-0006UA-IU; Sat, 05 Oct 2024 16:06:30 -0400 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 1sxB2i-0006S1-Dj for qemu-devel@nongnu.org; Sat, 05 Oct 2024 16:06:20 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sxB2g-0001oJ-Ob for qemu-devel@nongnu.org; Sat, 05 Oct 2024 16:06:20 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-20b9b35c7c7so22719815ad.1 for ; Sat, 05 Oct 2024 13:06:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728158777; x=1728763577; 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=oB3S/z+Tf/YurYPbjZAkQ2iOmy2pkllXkguo9aONGm0=; b=Z81JQxamY/5IMjBFOjU5Qo4rmxWDSF7rUAPlpeNZVZRoJt0HgQE4QSQZQ9CARxwbWQ k2a/w9ERxKkfstauPyLojlPVWFEELh4HepdX6N3YJPcA7fkXNcAvVto9au0hhhxSYzk/ p9nAXPZydfCzN9L6jB0zpuOBtMIFkQhtyXoN+AWCIk3Zn2A6p2JleRdI/LbmdcN1MO7e PdrVrwXOPNri+UFk57nu3IPS51rf0Oc/F2DFGsP+OCLPyLUo7IR3WcwpSQZzNHzHYlVv 2xUWRTrqEjYN0ExYdIOL3em7frb8LJJ8HPOI1WvS5VEso20kow9KyU3CP3Tv3gbSWZc8 8PyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728158777; x=1728763577; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oB3S/z+Tf/YurYPbjZAkQ2iOmy2pkllXkguo9aONGm0=; b=uD7WnBiSQ5AjiGt8/iBk+7Qlg7lLOE1uwA1hV1H6g1MMCnZ5ADEESeQwGjPkLx8cLM ZZM19ExDv68FGkVprQCP8++/pRPxaBg6/kuOswlONsFTmQWz3vB9dzJdGAx3FnCNz5v4 pN9E9PL7kULjN1cZcu3fJb7dPBw9xljd0dCO/51z8boUaJdHih4wz3EmQ4W7p8O9w5GR dBWTxTAqyhPRtZFIBcOLK1lZhPK8Wp2PUyPdiON3xB/b8bgj528BS2PPi37JwD5AlsNi KwW9oRv0c+u/45CSbGwz6cKooakvWrPs6XEhmOdigVTH86uyfVEY1jdgXPovjZrum1YR NjHw== X-Gm-Message-State: AOJu0YwlQ5r/Pk2urjZOqELISEy50JZMK8BnPNk+Zgz9v/UjSwqUUkz4 YsT44uPvsoXfEnmjtrKhKM/IRTzpJd9GTVHp/FV6nZxwh8bf3SOUNZEcVUmZulPCDwX19caGSoA r X-Received: by 2002:a17:902:dac5:b0:20b:b132:4dec with SMTP id d9443c01a7336-20bfde57e80mr119970415ad.11.1728158777552; Sat, 05 Oct 2024 13:06:17 -0700 (PDT) Received: from stoup.. (174-21-81-121.tukw.qwest.net. [174.21.81.121]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c13931055sm16493405ad.139.2024.10.05.13.06.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2024 13:06:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@kernel.org, peter.maydell@linaro.org, alex.bennee@linaro.org, linux-parisc@vger.kernel.org, qemu-arm@nongnu.org Subject: [PATCH v2 17/21] target/arm: Pass MemOp through get_phys_addr_twostage Date: Sat, 5 Oct 2024 13:05:56 -0700 Message-ID: <20241005200600.493604-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241005200600.493604-1-richard.henderson@linaro.org> References: <20241005200600.493604-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Pass memop through get_phys_addr_twostage with its recursion with get_phys_addr_nogpc. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller Reviewed-by: Peter Maydell --- target/arm/ptw.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 0445c3ccf3..f1fca086a4 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -3301,7 +3301,7 @@ static bool get_phys_addr_disabled(CPUARMState *env, static bool get_phys_addr_twostage(CPUARMState *env, S1Translate *ptw, vaddr address, - MMUAccessType access_type, + MMUAccessType access_type, MemOp memop, GetPhysAddrResult *result, ARMMMUFaultInfo *fi) { @@ -3313,7 +3313,8 @@ static bool get_phys_addr_twostage(CPUARMState *env, S1Translate *ptw, ARMSecuritySpace ipa_space; uint64_t hcr; - ret = get_phys_addr_nogpc(env, ptw, address, access_type, 0, result, fi); + ret = get_phys_addr_nogpc(env, ptw, address, access_type, + memop, result, fi); /* If S1 fails, return early. */ if (ret) { @@ -3339,7 +3340,8 @@ static bool get_phys_addr_twostage(CPUARMState *env, S1Translate *ptw, cacheattrs1 = result->cacheattrs; memset(result, 0, sizeof(*result)); - ret = get_phys_addr_nogpc(env, ptw, ipa, access_type, 0, result, fi); + ret = get_phys_addr_nogpc(env, ptw, ipa, access_type, + memop, result, fi); fi->s2addr = ipa; /* Combine the S1 and S2 perms. */ @@ -3469,7 +3471,7 @@ static bool get_phys_addr_nogpc(CPUARMState *env, S1Translate *ptw, if (arm_feature(env, ARM_FEATURE_EL2) && !regime_translation_disabled(env, ARMMMUIdx_Stage2, ptw->in_space)) { return get_phys_addr_twostage(env, ptw, address, access_type, - result, fi); + memop, result, fi); } /* fall through */