From nobody Sun Nov 24 00:51:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1728432490; cv=none; d=zohomail.com; s=zohoarc; b=Kkl3m6bxcry5E8q+7yrjhAUm5SJDrp3AunlD/+XKU/o3QP4Bru8XCnlbquzz1YcbHh3DfOWKFQubRFTDrSEwQjtrY1Jqb4Eiv0IFZrV+Nr8umK3xjU4QqGF5yr05lQnF4Jupt3ImCyC2matTYwUTi40ny1S4+rihrn0BaOnlZnw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728432490; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=HpCts7Lc7po90jMJZMaWUdEUzHFwVBTsaL90Hh3zO7Y=; b=Ig45tdJIHTGdhZ6ERyzOpKTbHoTBiLJcl4d/IlhrKZTIS/8/92PHRZROGBHbD+l/65pEE2M6xauTlo/ODG46ob3Ti6+ABOVwjLOly9Ir210vg+g+st0ElqX7UQYGK2j6NQKV1XpeYL0UY3gTNXfBRz7VIVGbo21eM36cqedZD48= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1728432490922393.1042983274066; Tue, 8 Oct 2024 17:08:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1syKCa-0004Sr-Qq; Tue, 08 Oct 2024 20:05:16 -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-0004Ps-29 for qemu-devel@nongnu.org; Tue, 08 Oct 2024 20:05:14 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1syKCV-0002uo-4c for qemu-devel@nongnu.org; Tue, 08 Oct 2024 20:05:12 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-208cf673b8dso68771795ad.3 for ; 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:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728432310; x=1729037110; 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=HpCts7Lc7po90jMJZMaWUdEUzHFwVBTsaL90Hh3zO7Y=; b=CkEt7i4AM9zM3IIh0AOS7bpPHSCnvlfX1qFxZB4sT+EqkeKwXd6Yl2aufbaXiO9EUE KlstvE5w0NyS0KfTtSASAyHQy+amoiGTsJV6mNex1uZb55+dBP6zsO/gvDEWIpR+8fwq sNUgZN5Or6Duyb9tb83ryRplsGaQMIYAkAlPy7xK6VMbkLBIb2eQ9AEClOcJAbRCNClc /93xyn7CR0taBJvrO9Kv0hAcdVmpv6D2Yy8dZGJPfMy+XA2k072cEV3cV6Lsg+qrtyqV K2jp3gNur3AM/ag2eqM4H5ITaqGb2ahNs48mYnExx7A9L/0F9sxnLMwdF5mm17itxItX e7IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728432310; x=1729037110; 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=HpCts7Lc7po90jMJZMaWUdEUzHFwVBTsaL90Hh3zO7Y=; b=gf182TIs6KdmR8hyrXDBV/LtNYjl9Ihp/Mk7H+S7k0E9+ghekcQ2lFxdaV0OcfBmsA DcI1/IRI5qnjdNuk+8Fhq6wQ2HjI1MpWPWCtl8Dluh8paMgjlciaTJIqNgrDkd9EPv9f r8bwrXAX5gRRkq3AP8CxdPLwzTYnoykJHvzShA3JtCeJeBu+Id0UXdEbJK1MuJEWmxbF Gstaa1O3nM1v8bhlwAIy3WWGErh5iYHuDPrwY3R76kyMAJbRnyzB1lvHDkKn0N6y0FA0 WhmbVnS1YbKY8iVow7/fy2823JhKRoKkqM2TLx5nJ3jhSVx2BtVZEhXAdYvGFspByHeG JQEA== X-Gm-Message-State: AOJu0Yz8q4yAkWasf3jQy9h+xAihzF8AsWK/xhGDTvzUmXh3TDqkxSa1 ilzZHtOzoDtqdQB4FIfFTg37piEIUDOVLJ5XIr93u3LJFUCiWWlIncFdKOQhuf3f5wfru93Bzfp S X-Google-Smtp-Source: AGHT+IECyy3ECPwpIxrRErzht1GulXjMyxKnwSvtoRqfwlCQOZkW3JggsvRngQz//es+//aYqmgOdg== X-Received: by 2002:a17:903:22c9:b0:20c:5960:bd35 with SMTP id d9443c01a7336-20c63710345mr8780115ad.20.1728432309687; Tue, 08 Oct 2024 17:05:09 -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=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 15/20] target/arm: Pass MemOp to get_phys_addr_nogpc Date: Tue, 8 Oct 2024 17:04:48 -0700 Message-ID: <20241009000453.315652-16-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1728432491250116600 Zero is the safe do-nothing value for callers to use. Pass the value through from get_phys_addr_gpc and get_phys_addr_with_space_nogpc. Reviewed-by: Helge Deller Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/ptw.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index e92537d8f2..0445c3ccf3 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -75,7 +75,7 @@ typedef struct S1Translate { =20 static bool get_phys_addr_nogpc(CPUARMState *env, S1Translate *ptw, vaddr address, - MMUAccessType access_type, + MMUAccessType access_type, MemOp memop, GetPhysAddrResult *result, ARMMMUFaultInfo *fi); =20 @@ -3313,7 +3313,7 @@ static bool get_phys_addr_twostage(CPUARMState *env, = S1Translate *ptw, ARMSecuritySpace ipa_space; uint64_t hcr; =20 - ret =3D get_phys_addr_nogpc(env, ptw, address, access_type, result, fi= ); + ret =3D get_phys_addr_nogpc(env, ptw, address, access_type, 0, result,= fi); =20 /* If S1 fails, return early. */ if (ret) { @@ -3339,7 +3339,7 @@ static bool get_phys_addr_twostage(CPUARMState *env, = S1Translate *ptw, cacheattrs1 =3D result->cacheattrs; memset(result, 0, sizeof(*result)); =20 - ret =3D get_phys_addr_nogpc(env, ptw, ipa, access_type, result, fi); + ret =3D get_phys_addr_nogpc(env, ptw, ipa, access_type, 0, result, fi); fi->s2addr =3D ipa; =20 /* Combine the S1 and S2 perms. */ @@ -3406,7 +3406,7 @@ static bool get_phys_addr_twostage(CPUARMState *env, = S1Translate *ptw, =20 static bool get_phys_addr_nogpc(CPUARMState *env, S1Translate *ptw, vaddr address, - MMUAccessType access_type, + MMUAccessType access_type, MemOp mem= op, GetPhysAddrResult *result, ARMMMUFaultInfo *fi) { @@ -3547,7 +3547,8 @@ static bool get_phys_addr_gpc(CPUARMState *env, S1Tra= nslate *ptw, GetPhysAddrResult *result, ARMMMUFaultInfo *fi) { - if (get_phys_addr_nogpc(env, ptw, address, access_type, result, fi)) { + if (get_phys_addr_nogpc(env, ptw, address, access_type, + memop, result, fi)) { return true; } if (!granule_protection_check(env, result->f.phys_addr, @@ -3568,7 +3569,8 @@ bool get_phys_addr_with_space_nogpc(CPUARMState *env,= vaddr address, .in_mmu_idx =3D mmu_idx, .in_space =3D space, }; - return get_phys_addr_nogpc(env, &ptw, address, access_type, result, fi= ); + return get_phys_addr_nogpc(env, &ptw, address, access_type, + memop, result, fi); } =20 bool get_phys_addr(CPUARMState *env, vaddr address, --=20 2.43.0