From patchwork Wed Oct 9 00:04:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 833854 Delivered-To: patch@linaro.org Received: by 2002:adf:a1d9:0:b0:367:895a:4699 with SMTP id v25csp556847wrv; Tue, 8 Oct 2024 17:09:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV8om+PileI7et1metFdkF2tpI8gOlppDMRzZF2qWUdkFwA5HrvUNaZf/M78qT/2XZbDUj7Ug==@linaro.org X-Google-Smtp-Source: AGHT+IFs3cUW4aEixBZ4mIoGj/8//vsfR1VOjHsK5s5GIk1JNcrZC56+d3z80pryOhatXD6CJixW X-Received: by 2002:a05:620a:4452:b0:7a2:e53:3f5d with SMTP id af79cd13be357-7b0874e1560mr75029185a.66.1728432550148; Tue, 08 Oct 2024 17:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728432550; cv=none; d=google.com; s=arc-20240605; b=aPc7dVMAW2l6herQh0OvfOWf1/zG8A1jRt5LczfRaiUgvN6zeryUnmkDfmTDZwkARh YYCx1UdH+w4OEjRVPNWF4WZZQ3YhwiW9Lj+c4t+YMwy5biC4SX0AufsM4UiJ5OU83YXZ 5q/d8sFVBDLbcklNY1kjC71+uW7OvqRCI+nNaOXeHFcHJPaXgovWNX0fTM4TmBWs8bcw xoiO4hkyD70v6rZ6nOPXGLRcmALI6T3tpn9JMOYoqficX+ViCLT8EOMeIV/nmzxdMxs5 iZA/DUHFv3jU2zzvHz6BlO6qfdBUKleXoFT9NsDxepLZ5iJTGUWIu7nWrh6IA3PofJYJ D3jQ== 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=617h4byv7OP/ct3y2kJCr5k6Qy1wZsttJUBcCYmwvNQ=; fh=3RK8noKPsRgJpwHDkrKY6p9N6ePZuLOt1ZjdS1VodvU=; b=SrU5KpzN1sBSuTPnfjnHpymqaLHSUGeDD5P/+CTYSkQ3o7r0lWyPRg3nTXS+pKzD9f pUWUzJxwHHFpQO4AaROsKT4ogzLNZWJP+7twSeB57aU43FsCAcIsCnRTydxnXtHZk9HA saN7tPBrW8O6uf3ljVobAECsAZjE0VPr2xBdIFpTH+LgboTW+yhfzue1l1qcAfj+PhYC 9XlVlNSeJePWnU0irqMZhX7xmq+t+Z0ZcrXET375fWnO9UIdosymmSzjTwWd/Uf3JdID l9nn8vDVmlylKpD14W3CDORUPlXQkFAEclF0y1Il4gwqa77nlLq30+EbJCDWH14X+DsE EGKw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BjRYaOoD; 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-7ae7562bfa2si1003704585a.177.2024.10.08.17.09.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Oct 2024 17:09: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=BjRYaOoD; 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 1syKCZ-0004R7-5v; Tue, 08 Oct 2024 20:05:15 -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 1syKCW-0004P9-Pa for qemu-devel@nongnu.org; Tue, 08 Oct 2024 20:05:12 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1syKCU-0002uG-8M for qemu-devel@nongnu.org; Tue, 08 Oct 2024 20:05:12 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-20bb610be6aso68589335ad.1 for ; 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=1728432309; x=1729037109; 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=617h4byv7OP/ct3y2kJCr5k6Qy1wZsttJUBcCYmwvNQ=; b=BjRYaOoDQGEsEE64uTZ7bFuN1BblEZoOjojjTKsNeTifmXKqMK52hDK2HnBmnvOENl i8Tas7iasYxs65yHsDTiU4OTFE4k9/BfMuLy24MMbvlOGETEuTujulFZ/1nFNhNmniLW jD2BKU5vk/SCIFn+AIcdh8+LC7ff3JF4of+owiwLmpnb0Vvjzzd/o785mpn+cnq+Zxv1 SiwG7bn3TpccfnsDCaGCw6iP+s7MuT9UL4b72/LFRT35vCDUD4NMSDwhwR3lGve074Is 1tz78OlJwX1IQwh3S0QXrGMQf/9ld7OdfAMfL5k/3U8nCHq7C76JNkbG6gbY2dnio/J6 F84g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728432309; x=1729037109; 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=617h4byv7OP/ct3y2kJCr5k6Qy1wZsttJUBcCYmwvNQ=; b=K8ZuvjVqWH22WzmcT/PIqdvE7DFw58j8og5SLAPX/llwN787SJbR8Y4Pk9nlqWTZS9 lqPUVtnXPSzH7mScjeWzyFOldLWNFnoYNf+y+iiQSHNSALIALugH0zNTs6o55t0Yo0dq MHmRlUZu5/z7wp09yjIEZ7tUi5A4Ri4WglyqLf7gqh9FZz3MnB1g1XCXJnF6YFl99XyU HT3zKzEFQRpvbbdP3c4mEiIdNhycw+Dp0sk9vAOGUrPdyqWu6k6sWm8cDks9zOkyTRm/ o3mAMWRdZn58N/MI2xff8IgPpL2ICoSJozZP9bIen6dby1oPhp8tls33xG8ixL2eegcT waMA== X-Gm-Message-State: AOJu0Yz/KmtQ0ba3tSlfSZ+L2NMv2ijNsag28gdHBWuuA8p+TTjkyoOK NPnLwXizwimkPRWx0AWw3p+Xm5qFXmqbaw17jwNMkF2oie1Lg418c0ftCgt3GVtCIesc36bpR41 c X-Received: by 2002:a17:902:e543:b0:20b:5be:a403 with SMTP id d9443c01a7336-20c636f5d9fmr11781085ad.11.1728432308873; Tue, 08 Oct 2024 17:05:08 -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.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 17:05: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, Helge Deller , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 14/20] target/arm: Pass MemOp to get_phys_addr_gpc Date: Tue, 8 Oct 2024 17:04:47 -0700 Message-ID: <20241009000453.315652-15-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::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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=unavailable 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. Reviewed-by: Helge Deller Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- 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) {