From patchwork Sat Oct 5 15:25:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 832973 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp1255846wra; Sat, 5 Oct 2024 08:27:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXDY68uFZQFJPBhIod8AxepLhQIYb3L0SSDRXtid0RvfvhswhFqwLZyRLsJi5I6jRgWb+pT0w==@linaro.org X-Google-Smtp-Source: AGHT+IFMY0wWjW7ci4kdCw1RrTUsZQyzA1vby8lU8S+r6yRazgy2O//KMbW9+GVYx91Og0hcD7po X-Received: by 2002:a05:622a:2b0c:b0:45d:a127:8257 with SMTP id d75a77b69052e-45da1278757mr68759421cf.57.1728142052194; Sat, 05 Oct 2024 08:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728142052; cv=none; d=google.com; s=arc-20240605; b=NeMhGXgY6EPfryYNsYJkfuKB5XnXwPDuY3Xi0kDswFHhu+9VUkY48intlq/HFCizuk 8mnZ2peOL1K/6HrXQ2yUNygRAunbOyDvuEOC0mEMxhHyq9sePQXf8UhbMCw1w/hrxaA9 z74kqfYnPEkG9Uh+JtyYBlqHwq/QE3XJoM/LtPk+8KWkFnjq/+KNsV3kv3gdTTn6297z qMtkuDV/UYu1pID7xNFxDhwRkZcd7jPyOdOzZi/mHOyCgN8+U0n0ekIW9z48Ux2N9GE9 JOiXtZDvLQ1FKiVDq4kEv2EFcYC/ZG0LdAVqOcBz7W3ZGFahcN8Hp0oWMPCGItLuaTUH 0SNw== 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=HXYa3J7schBYghLGy8zYltYxpDE6I3UU8CU+gjXzMrIxeljsJMb99NneLXueLdLntU nwVBxonlH9wUNAcgO5bJ2XZ4ML8Gr5XCGNM6rRWDiQbI+k6YRaZw4OQQ5oAGhaitovLk S4VfO112jJsh2h46Fz2I9e3aCTiOWxz3vB9OoJlMzuoDMk9YrCqIEHAoLMD3TOzF9zy9 uwheuof46kq+HPoAWqp5rx0wbbNxP4eDQGS9j+yUFhsWCR9EhqVS3zqzXhOMxWLivG4O BzwZ0edINOka/MRK+7IAQ3wtrUV30/pIh08Spb3Snh3FO/BLxDv3J3rjFVD65IKM5Ehq EZbw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OtTQd1cd; 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 d75a77b69052e-45da76995cesi23398181cf.614.2024.10.05.08.27.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 Oct 2024 08:27:32 -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=OtTQd1cd; 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 1sx6ft-0002KF-Ei; Sat, 05 Oct 2024 11:26:29 -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 1sx6fd-00028Z-Rj for qemu-devel@nongnu.org; Sat, 05 Oct 2024 11:26:13 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sx6fb-0002Pr-3b for qemu-devel@nongnu.org; Sat, 05 Oct 2024 11:26:13 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-207115e3056so28290475ad.2 for ; Sat, 05 Oct 2024 08:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728141969; x=1728746769; 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=OtTQd1cdWPLuugQ5KG+BA0nlxRGl2kTb7ZBDToC5K+jfsnGgnMHovf332GqIFgnEDC RcPxcxk3tDjW7MImV2NdgrPlGUz5tBwqsOH+xlde72GeT9XHVgNj6f4sfC/Bvld6lMlB oLD3ymtbwEc3ba4Ipt4Jx6eW515SwyZiCCK7Hj08CzR+6mKUrMP3bIbrC6IP7rRPjox8 1cMmpzmuY047u8PMfMA/Ds8RknVwrEiGmAFkV/NodaV4f86Es19IpNeJ15jxNudoCn1j Z4jRcatJLO0x7TMAmQW2E5BloR7uFvo/vhxv94M7ZYeNKcuU6itZFcMtVNgfFUlIJAiK tHOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728141969; x=1728746769; 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=RvrqLV+AsUY0BwTTpgr9fC29fyRwF6sSr0itYBWgZNNwb6+Bxw+6JTJIYeOkVyD4FR kf5DPlELoJT63O6NQoUb4OJwuof2XT/QlGKlcnYRzcMdM80bhpbUaA6scEPtjm43RSKR pNM0iXmkrvcS89Se7iuMjJ6zihjNEaLmJfJaA7HGV00hzDkhrXeDxbF4IRVDBTkffi6s bKfN2m/tSSv3qNcEOiQfPtMiAvX0dax1e1FZO89og8LcxOWz9jLD7Y0ArKRj+aE9mJOh PjmPfcDm8qpVfwlAfhBNnIt4s+0Qdfct3719tD6dL5Y5buHa7Nr+/PfFrAJBiiNwT5RE JY0Q== X-Gm-Message-State: AOJu0Yw+hE3UkOtec9OJqDkNhtnBxVyrfdXnHpOl1SkOvEmOdJcKE7UY Jbc6IgP3EQZE2k0EYvaiqququjXzTiTG1J20fnoSMWvFdVZsrMSwsEtWQXA8gBslsWmYL9ho5A1 E X-Received: by 2002:a17:903:2343:b0:20b:8924:3a77 with SMTP id d9443c01a7336-20bfe071396mr82155675ad.26.1728141969294; Sat, 05 Oct 2024 08:26:09 -0700 (PDT) Received: from stoup.. (174-21-81-121.tukw.qwest.net. [174.21.81.121]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c1396948dsm14351765ad.225.2024.10.05.08.26.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2024 08:26:08 -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 17/20] target/arm: Pass MemOp through get_phys_addr_twostage Date: Sat, 5 Oct 2024 08:25:48 -0700 Message-ID: <20241005152551.307923-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241005152551.307923-1-richard.henderson@linaro.org> References: <20241005152551.307923-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.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-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: Philippe Mathieu-Daudé --- 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 */