From patchwork Sun Oct 13 22:12:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 835107 Delivered-To: patch@linaro.org Received: by 2002:adf:b352:0:b0:37d:45d0:187 with SMTP id k18csp1735967wrd; Sun, 13 Oct 2024 15:18:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWiM2bHw7SPhLEQcwLPy47IW1Pmvr6UuvMmKaFJGE+EAUQohJobTONRcesaCZ71kAGzTCoOJw==@linaro.org X-Google-Smtp-Source: AGHT+IF5sdCOLU0ZDRxXUa7/hnityjsVmoxIwG2hqkBX8K5p5S/QoXorpT96qcd34eok0WMDxb1t X-Received: by 2002:ac8:7c46:0:b0:458:2b69:9496 with SMTP id d75a77b69052e-4604bc2ddd3mr155520671cf.38.1728857889990; Sun, 13 Oct 2024 15:18:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728857889; cv=none; d=google.com; s=arc-20240605; b=HMZneEeROu360T5f/PhQanQ50JGckuhkCCMj28Tgrx3edvHXXXF5PTR5GeO0f0lfye 9xyV5IVH+PccdQMrMNnsWyVL3dc/7PN6Cwc2UeKBZVSih04RqsJdFPh/MmULhYCJLUj+ jQbRhvkshdjtnlbH9qtmxBgK6abDG9jBYBYvaKtZng79pASvY+BZOyFxnEZtcvAMptw0 nkgcH3JLRa3EKbN5FLrRda1g021/EJNQo1xnOLTq/O8IbF040k/uTy6WW9gFlFzhyixU gW3ZlLD4dO58nwHAsxPfwvn3+6sJ8xymZ2yuJ4PgPxHqVdWEXZlV0aq0GZ3ssME6l1N8 5o5A== 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=nPsGlRApUHllpr7HECmYu85LwKI3gq1PeB/gQzKhtMY=; fh=jPrxLhM/2+ATb52kRFb3bxuZkptRVHP7DuqEwlo+BX0=; b=UQqAbR9dGzzJ4W3oc8m/IH4aUnvhzamQ3xVrB8eCwkHO2QOANQlxPthGFRv6yEo5/Z 7t9HFHh59kzzcsX6XZZ8DwhlGRT8v2IFNA2NTNEgrfMEtoSyQFtNrYdZ+DIfC2KB0/e+ GqD/Sr1glq/CmV+VC3bvu3VqYoGaEYJq9dbam+hajbFsP3Var4PSwX6hMt7gDtvLcB9E Yzq9NJTyjAwiF396jGI779AJylEeCJYmHEVbxVRWoaIPxFv407eGNO2Yr01v5U+DJTMl LiVJzxLl8dHCnL69LT85tKPwd4LNp+Dpu9U+xZc/9Trk3RQz1MMQn93qI7lm4SBwc6Pn ZEOg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a5eVqYWv; 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-460427bfdb0si89379941cf.130.2024.10.13.15.18.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 13 Oct 2024 15:18:09 -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=a5eVqYWv; 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 1t06q1-0007HF-1T; Sun, 13 Oct 2024 18:13:21 -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 1t06pg-0007CP-Ok for qemu-devel@nongnu.org; Sun, 13 Oct 2024 18:13:01 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t06pf-0000xB-B2 for qemu-devel@nongnu.org; Sun, 13 Oct 2024 18:13:00 -0400 Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-2e2a97c2681so2633640a91.2 for ; Sun, 13 Oct 2024 15:12:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728857578; x=1729462378; 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=nPsGlRApUHllpr7HECmYu85LwKI3gq1PeB/gQzKhtMY=; b=a5eVqYWvGSmnfNWZMVOyApLbkdqJSqPmd1kq8lKCw8RJ4d15JR6JnZHiByyvEDEmXf N7768V2wn5RPh4kH0A0JLJSIskaQb+K9jUnHTscJTbDzmdTQ6UALuThB/GQ+8K7lrHti gcELCjrtYRmZuLhCbzCr+/bwfoWZfBm33wBXJhiMqfkdwHXQEnHq55AcPh6SsoNv+K6P 0YB7KCX4zAF1u4Wi6NmwZwaGrfXFBXXtq3fMluyaTjNjZYklKF7RWBJIh0rlrTXM4gYt /dg9MXsXkIDdt5sIK7jGfzlLo8bKiXJMS3BSG3cc1MVFVyhhcV4KdljPShLjm5PGqi/F o0aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728857578; x=1729462378; 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=nPsGlRApUHllpr7HECmYu85LwKI3gq1PeB/gQzKhtMY=; b=W0u99OF+JTpmJQsZU2Uta0EVddGCtGudoEHxeMq/Ujz0IrxUqS1e/mxDoSUucf+YlG qH2+ouI1QvFZ8YonRKmePTxw7lSU1+hgw+gUYdBbCb1MACJ1rAlpUNBVzYfRK1Rru16R NDoCh/8qGZeaaRNnWpgrj1Q9SoGnAqB6uQ9EhFTf/J20WQi+CGzsvi9Gl3J/bkNCVC9Y Pi2lBeqsFuCZqZiBvEyhIpcNnvXi9BJXronFAKFyY/cQb2NffZXK74TJhgrbSLQD/DpX PL9O2mb+cX1v01mRjDxmNuzDYPYJSUccH70S8zMPKJsu4AAMZa60A7oW3BDoMzvTb934 Qt3A== X-Gm-Message-State: AOJu0YxnsKyxVS0jV/e0ZpBWWrZha6Zqo+PgoZPaR7TcGW/QY4XbALnq ycXwjXPfIVYiV+HARxqJu2dW0e3MDPm+YWXCypOBT9V1toBzHUlfVqEfLgsJ2uBpzPWNIpXS3a+ A X-Received: by 2002:a17:90b:1056:b0:2e0:db81:4f79 with SMTP id 98e67ed59e1d1-2e2f0a2fb2cmr11105444a91.2.1728857578022; Sun, 13 Oct 2024 15:12:58 -0700 (PDT) Received: from stoup.. (174-21-81-121.tukw.qwest.net. [174.21.81.121]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e2d5df1eebsm7271958a91.17.2024.10.13.15.12.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Oct 2024 15:12:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Helge Deller , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PULL 23/27] target/arm: Pass MemOp through get_phys_addr_twostage Date: Sun, 13 Oct 2024 15:12:31 -0700 Message-ID: <20241013221235.1585193-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241013221235.1585193-1-richard.henderson@linaro.org> References: <20241013221235.1585193-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.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. Reviewed-by: Helge Deller Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- 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 */