From patchwork Wed Oct 9 00:04:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 833828 Delivered-To: patch@linaro.org Received: by 2002:adf:a1d9:0:b0:367:895a:4699 with SMTP id v25csp556490wrv; Tue, 8 Oct 2024 17:08:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU545C6/FtnuEsZv579NcWdmliuaCxOCugH1gBf33XrPMlfIpREM36PgCYTLmGZnRc8pAwwhw==@linaro.org X-Google-Smtp-Source: AGHT+IFCsxZ1f+UybI+lf1/bDr1Yiwcah5vCneaGRn4hOPUMIeXqDAR4vQNJG8oFXOP2dHSD2rGA X-Received: by 2002:ac8:7d46:0:b0:458:4e4c:b692 with SMTP id d75a77b69052e-45fa5f21917mr8335771cf.36.1728432490209; Tue, 08 Oct 2024 17:08:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728432490; cv=none; d=google.com; s=arc-20240605; b=eZZ83e5Ugx6kDrKPfnEKJlR0kxt1/wdG+dLKoIG/xdN5QitBTCUBp5Zz8FDbftOe/D aZCih+pA0kvk+wcRwTuPAsqHpfnBKec9kiuvEFIsRpdpdqOogFYZHUEOWm+9E4rOXGKz wm2yQ7npuWYtOOzt5GfABdwJTqEpMi7uTCMqi7c4Rdav/OJOv2+9duvnca6lTSwWDPEg zp9SkO4xnl9gCbrhLtpN3dWP08CkLcsW+2kiWdedEhPWn+4PZG7crmw7PnY0eEMx72Qc dJDoLItsD+hzV1NcoRL2BP1vOqGofQX7/F8rviz/kqKXNvvLJ0GfzhH+RmGQV9YyPpRp N9Fg== 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=3RK8noKPsRgJpwHDkrKY6p9N6ePZuLOt1ZjdS1VodvU=; b=Ptzl/R8HEQ2xkzrCrtCfbU2D668lUlfdwE1AjwZJNUywONFk2biwuLjACcBU+UumVY 0awMe6jkv+iqOi7ObHbCUpYJx5khnkrlF8YNRnwM0OX3y4Wx+gfh5Q/vdiQRSbKgVSqJ k1vDrKE5qEjwIhLaANAyETuNIQLqrQCNfYHE0D04o10TTvXyNoI2n88if1flX2i7x3d9 hwxzBSmlqTsMKulDn/UNjMI/nlQURmJ0Wwz2UuhjfbpKXe4+sVLP9ThcY0HBs+bkjvwj m1kHJc82XMNC08qW4gk22wd2FTQbpt2xHF6lwCxNj4FfJI0fEVV0w86k4xQQB3dtcrin UrWw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RCevTzLB; 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-45da74ad109si102484081cf.67.2024.10.08.17.08.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Oct 2024 17:08:10 -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=RCevTzLB; 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 1syKCe-0004WI-Sh; Tue, 08 Oct 2024 20:05: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 1syKCY-0004Q6-4J for qemu-devel@nongnu.org; Tue, 08 Oct 2024 20:05:14 -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 1syKCW-0002vP-FL for qemu-devel@nongnu.org; Tue, 08 Oct 2024 20:05:13 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-20c693b68f5so674385ad.1 for ; Tue, 08 Oct 2024 17:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728432311; x=1729037111; 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=RCevTzLB/Xw8viAlhPQPqUOQhWu0Gmnlo7fqMLuL82t8w0awlbAcTdh2TdY7vmta4E q7FtrPfI9f32kgmUcH2mAPlrLEp69Z0MkKD0M5H1Tpew6YJqkVvVulwztFUo6JUAw8ru Ns0QAbnWHEm+CJGS/tzuA3HNfvTK4dwmf6K5XhembELKT16PzhVg+c9YFLAINyIH6RK5 lB0t2jIVzF5pZRt4DuZXOce4JpZteIkK0S7UNNI8kNn+NPkx7z+Z2GdgqblS9KALoNid o5wUFqlM1DFmA5ylm0n67ZWmTrzSazoS2iAa4A1AjU6wXmJspa28kPYFcX0+aXEBu0Z2 acaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728432311; x=1729037111; 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=lqIWOklmVPhrT1r4A75bR54F7XMZlp7jFk+dUJpSCcGvixseyrsSAGv5YDrwR1ZntP rxtaRkCVrRfgNl/8PI7LOLykiNip/9RaYSRYY8/JTylynct9t0NClzJOEY/2pMR1T7K4 xi4BA+c0puhWhcd02xYA6ROqistjM0v1HIJTitIzKifR3EUmJeQxeH+1HcFx49s16OlO VuuFtbtDcgr80dvzxgt2j/QrqJKWSFhPGsOajiJwie6zrOmkadNEZtM2QPOIrv6YeKwK 5jgSa9SGUeE7YHlm/uP+rQ8TjbG3b0YcBEE4IKEd2POaSzfWjAA1pAyrttXjz7s29Y9d ptHw== X-Gm-Message-State: AOJu0YxehA0klsT9ufZmQu6N333go4ekkqoDHHwC/ln2xWqHSH7/910E fWJweKakNp7Y433DdjoSX/dSO6cbncj4C2i8+wKOZ5lAf1V8j61+XE5Vv1cr3ZfRs3R81Q/o2bS b X-Received: by 2002:a17:902:d585:b0:20b:a739:bd60 with SMTP id d9443c01a7336-20c6378d2acmr8950605ad.51.1728432310616; Tue, 08 Oct 2024 17:05:10 -0700 (PDT) Received: from stoup.. (174-21-81-121.tukw.qwest.net. [174.21.81.121]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c138cecf2sm60705105ad.104.2024.10.08.17.05.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 17:05:10 -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, Helge Deller , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 16/20] target/arm: Pass MemOp through get_phys_addr_twostage Date: Tue, 8 Oct 2024 17:04:49 -0700 Message-ID: <20241009000453.315652-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241009000453.315652-1-richard.henderson@linaro.org> References: <20241009000453.315652-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=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 */