From patchwork Sat Oct 5 15:25:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 832980 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp1256371wra; Sat, 5 Oct 2024 08:29:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUanykKoaZGqPIM75g48Tsnx3+nfcLoR21gKqtF/yJU5iFni9aVooE1sAikbe4W7b/bSX4L5A==@linaro.org X-Google-Smtp-Source: AGHT+IE1f4bsgVupErIDnAJc9MdxEUr+bJezYk70KkDsT8oBf5rB50ambMUkMBzaWeV1wXCh5X7t X-Received: by 2002:a05:620a:294d:b0:7a1:c40d:7573 with SMTP id af79cd13be357-7ae6f48e01bmr1110853085a.49.1728142161428; Sat, 05 Oct 2024 08:29:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728142161; cv=none; d=google.com; s=arc-20240605; b=KRKyFkR8IBmuctQ8F/fakqFdc8/yNVqaPwDyh98EuqLI+PqBYHf90VOm4rsurTe45t lm5xBEQqq+AXXC2hv1prLeYmRHQqgwO6mLFkFzAlfaYGoCUe5y7+7lBOz6MEAMQGcmmn YxuMp/Db9uFwmdH6ZunPN+/C0w2Mp71HHQTAGu5I2z7lsQ9i5DQ0LGz4D93fDvlHz9Dt roGBUwVWXg+6OAaX0GN/REuIx3mvbwFC1kY/kukqjcvMjGCZBtDFHwLh/MSpuAXHPaO2 2Bke0qTg1zNIfortUOWZpmZNnZOWcY9sLz9cXPu8X+QcLuRicGvxAd3p3wDqMYMpuJ9p /bvQ== 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=4X5zP7zXx4H0vSkmfgBSYylbUDArgVMPw2dfqzvhfaA=; fh=rQg8EQ8KH04w/0VkDYF6/ktgEyHJ2dqn1eatHCfBaLw=; b=d0Gs+FpJguvkhzWD708800U7R5LgcJTuVdE4qv8sIPkDpuYJCm+0Bwm2dBrBpcp4Hx mLxr2Df7ICTukN0dNsdWTgkHaktphfUVCVl2aqDuHmiZ8e0gE46UpN96pueFn2rqM4nb HTLxSYNa54KmLjiUFZyPd9m+BQ6ozonzMpCnTbyE0TKKigfvBabOy/rhpjNYBQ0AxuY2 j00hps7Uc919ZylRVfy4xU7ZFgF/mncFZa4L8XB2beirL1AzymTi7t9ZvoQHD7Y1EzNo qd+cvnJ+dzdKwUYqOppsijdUE3Sc3y/JhKAkF0udVQN4Beg+s5X/f+/gTgAtwZgWzeKi 3R9A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x5YzRLk4; 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-7ae75779c49si225297385a.768.2024.10.05.08.29.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 Oct 2024 08:29:21 -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=x5YzRLk4; 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 1sx6fe-00029e-N7; Sat, 05 Oct 2024 11:26:14 -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 1sx6fb-00026n-MF for qemu-devel@nongnu.org; Sat, 05 Oct 2024 11:26:11 -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 1sx6fY-0002P1-Nq for qemu-devel@nongnu.org; Sat, 05 Oct 2024 11:26:10 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-20b9b35c7c7so21873515ad.1 for ; Sat, 05 Oct 2024 08:26:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728141967; x=1728746767; 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=4X5zP7zXx4H0vSkmfgBSYylbUDArgVMPw2dfqzvhfaA=; b=x5YzRLk4ARd6XpiUopEFYv+iyWGitqOvwSXLlYUSZ/BgOIE07Hc+9hxiqJNatRBfd4 8hcEPA235BXocSstX592wCuiJGiJ1yPcKJr5pJvZcAhpB0G0cmoRjzL+9ZayYXA9eONg NLlozVhLBfhVos5qMndqHfcpCWKdzhoqwBQLAwtXV+Hx+1Jug/IFxHCNY3O1UuvPCWaJ pZ/ZZM0kuTIND1SvRbxWaT03etn33NY2VtUjWbo310W9SxJSTLKfcsZdQLXtJbSAa9cf o6tRVzk3FD3GcEAcvjRs3XQIIULJbdJqvtwmHNYn2mcjiNAnU1t4dXhr7BkLNAcliG4R Xs1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728141967; x=1728746767; 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=4X5zP7zXx4H0vSkmfgBSYylbUDArgVMPw2dfqzvhfaA=; b=EqcNM7Fwxtnofdd4NVYEvCpIa9DiFwT53ghJlYXH0NrPkfp8pXGyBrjeVa8mkcI2/B FfcM0bQks1JZqQgdXAVYtMyukDIqPO+L8NRMe+SmUBE4Sv5W3DzezK/XxPJfNNPS0kzu aGe0J7Kuq4EQoPjjMg9vI0rcw2RI3ThKrg2yk7HvJoALan1TC8JRxn+BkNblwX9lmueN GLafF3+3tStl/oHQWaf0fTKWIqlIM3Wme3JiZBKUKjkUbHPt5SJqD031kfbNf4UhsAa6 WaSD90WftC01Sl8mF+CKrz0j8n2fYOAQE5Ecn2R9yIMMPI8g+jSnmq9M3a6bAaH96bDY KvNQ== X-Gm-Message-State: AOJu0YwVgTxOXBlq1aMtDAoOEaqunBK6qU0Y2DoKPdiXBPMvzW23wsyb DS1Q0uORIDlilm46gtoSYIEjLrLeEdMSFZKgoa0mkP9RbsCEb4maTI+jqBDVGMHPffxn8oqDXv6 f X-Received: by 2002:a17:903:1d0:b0:20b:fa34:7325 with SMTP id d9443c01a7336-20bfe291d4emr83779435ad.43.1728141967491; Sat, 05 Oct 2024 08:26:07 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2024 08:26:07 -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 15/20] target/arm: Pass MemOp to get_phys_addr_gpc Date: Sat, 5 Oct 2024 08:25:46 -0700 Message-ID: <20241005152551.307923-16-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 Zero is the safe do-nothing value for callers to use. Pass the value through from get_phys_addr. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/arm/ptw.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 9af86da597..e92537d8f2 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -81,7 +81,7 @@ static bool get_phys_addr_nogpc(CPUARMState *env, S1Translate *ptw, static bool get_phys_addr_gpc(CPUARMState *env, S1Translate *ptw, vaddr address, - MMUAccessType access_type, + MMUAccessType access_type, MemOp memop, GetPhysAddrResult *result, ARMMMUFaultInfo *fi); @@ -579,7 +579,7 @@ static bool S1_ptw_translate(CPUARMState *env, S1Translate *ptw, }; GetPhysAddrResult s2 = { }; - if (get_phys_addr_gpc(env, &s2ptw, addr, MMU_DATA_LOAD, &s2, fi)) { + if (get_phys_addr_gpc(env, &s2ptw, addr, MMU_DATA_LOAD, 0, &s2, fi)) { goto fail; } @@ -3543,7 +3543,7 @@ static bool get_phys_addr_nogpc(CPUARMState *env, S1Translate *ptw, static bool get_phys_addr_gpc(CPUARMState *env, S1Translate *ptw, vaddr address, - MMUAccessType access_type, + MMUAccessType access_type, MemOp memop, GetPhysAddrResult *result, ARMMMUFaultInfo *fi) { @@ -3641,7 +3641,8 @@ bool get_phys_addr(CPUARMState *env, vaddr address, } ptw.in_space = ss; - return get_phys_addr_gpc(env, &ptw, address, access_type, result, fi); + return get_phys_addr_gpc(env, &ptw, address, access_type, + memop, result, fi); } hwaddr arm_cpu_get_phys_page_attrs_debug(CPUState *cs, vaddr addr, @@ -3660,7 +3661,7 @@ hwaddr arm_cpu_get_phys_page_attrs_debug(CPUState *cs, vaddr addr, ARMMMUFaultInfo fi = {}; bool ret; - ret = get_phys_addr_gpc(env, &ptw, addr, MMU_DATA_LOAD, &res, &fi); + ret = get_phys_addr_gpc(env, &ptw, addr, MMU_DATA_LOAD, 0, &res, &fi); *attrs = res.f.attrs; if (ret) {