From nobody Sun Nov 24 01:22:11 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=1728142056; cv=none; d=zohomail.com; s=zohoarc; b=jWwFkTB1vgYipHe79eSiKAVxWr/K2EBwHWf63bGT14js5Pi8vcY6iSknbjuZQsQITEuYGGnBkL+OL0VQvf5hVt+IKa4Psm1RLKVCCgG3oNtOdKrxy/+f3Vsj88jwUp0CROVH3SBNDhylsOaq3z1ppbsWW4OGo0g09vKGQPw24t8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728142056; h=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=or+46uGq1e2/GbDMKkBXfTr+x8kd8hih+f1GC2rPQFE=; b=He3wRZnnqYHDhBwk8+P4WrmL+pwIijiXD8c7nntGNwqqvhrYROm8HBtZp9Ki8dIgFkAPNuWv97U1E1CK4xHUymf0xYlPI4ULdCkTBST8bm6M0m/3N+74gz2YOjZIaHeYSzKm4dgwwsl8bqk7llO2M8DxnoxKF7hZAE2GZky+w4Q= 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 1728142056921228.89690639518722; Sat, 5 Oct 2024 08:27:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sx6fp-0002Hj-Fd; Sat, 05 Oct 2024 11:26:28 -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 1sx6fZ-000269-Lv for qemu-devel@nongnu.org; Sat, 05 Oct 2024 11:26:11 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sx6fX-0002On-NW for qemu-devel@nongnu.org; Sat, 05 Oct 2024 11:26:09 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-20b01da232aso24810895ad.1 for ; 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.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2024 08:26:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728141966; x=1728746766; 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=or+46uGq1e2/GbDMKkBXfTr+x8kd8hih+f1GC2rPQFE=; b=fHTXmPv0NroP7YB2PLlW/KDDp273HA7cf5HHo5K8OJf6rtsY76zNrO8ihvSBYaJqmV 8chUnhr9o2m2BHv+K2jlBANhFQoipXJcL33DWvkAOb22sITAKWGpfXzj+VMGY73EGeJ6 MLE7vA0jZDXW/ZV1Pb45P9F0RvKOxuylOC5viH+rIeP6+XCcnGzHAMR4SnI84TcY0eTZ UsY0rB3QhZvJ8OmljScr9Yon0qELgHykCf7dAssv18stTcBIytUm54djCBZ3yARS5+r7 MpbhMrpI639uZ3V9k8IYfyTB9rJm0lXvZ4N7MCbEbuVnqviKWmIh+hH8SoWWXU/fTsvb T8Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728141966; x=1728746766; 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=or+46uGq1e2/GbDMKkBXfTr+x8kd8hih+f1GC2rPQFE=; b=dAXUsW3gRL10WOuMfhvIsAta0H92/I4J1KudJ+j4c8CDd0XLA2sJQH6PfdxFnOmuhl LPger14SSY2pQenmVKOuBNOO+bRxqSmbB9JODRvcy8WF7Pgn2KEFa+l6CwHFKfXHva+n qj7MvsBRfF9ZRmEcUHUg264AcIQaxyJ3SsBO/i9qpOniqMvdyaG4vfD9N3sKKAtNZ48q IntUu95mcMayAUOey3XxQGzeZO3LEjdNUa+FCJI7bbR12ZNhJ3TPCH+vnP6rTX1JbLuZ XI8l43lJCcLf2/nVjsW5tOl6RFK/ipk9tiQgM5b13HxI4bB9oVj/fuFqwIUcZ3QSjFbq Ntaw== X-Gm-Message-State: AOJu0Yyg9oFgiFyhE/jLcOrG3vTwZzdZO7l24tgZ5Xo1qt+Ws8gvsyxc MgvfWcq7SNdYbsyutweXwPhbSaijQ1fiAHfhuVEhOszzCTT7vQw+EZt/D7RZcWd6xX07lEyONzu f X-Google-Smtp-Source: AGHT+IEdkuFzCvH96y6A82QUTiEIn2YBst+4kAUKQBDmS2IlhhIPoF71jwAfADtzZPGVJyjEo7r1sw== X-Received: by 2002:a17:902:e887:b0:20b:9365:e6ea with SMTP id d9443c01a7336-20bff393be4mr111588295ad.10.1728141966447; Sat, 05 Oct 2024 08:26:06 -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 14/20] target/arm: Pass MemOp to get_phys_addr_with_space_nogpc Date: Sat, 5 Oct 2024 08:25:45 -0700 Message-ID: <20241005152551.307923-15-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 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::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1728142057431116600 Content-Type: text/plain; charset="utf-8" Zero is the safe do-nothing value for callers to use. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/internals.h | 3 ++- target/arm/helper.c | 4 ++-- target/arm/ptw.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index 2b16579fa5..a6088d551c 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -1461,6 +1461,7 @@ bool get_phys_addr(CPUARMState *env, vaddr address, * @env: CPUARMState * @address: virtual address to get physical address for * @access_type: 0 for read, 1 for write, 2 for execute + * @memop: memory operation feeding this access, or 0 for none * @mmu_idx: MMU index indicating required translation regime * @space: security space for the access * @result: set on translation success. @@ -1470,7 +1471,7 @@ bool get_phys_addr(CPUARMState *env, vaddr address, * a Granule Protection Check on the resulting address. */ bool get_phys_addr_with_space_nogpc(CPUARMState *env, vaddr address, - MMUAccessType access_type, + MMUAccessType access_type, MemOp memop, ARMMMUIdx mmu_idx, ARMSecuritySpace sp= ace, GetPhysAddrResult *result, ARMMMUFaultInfo *fi) diff --git a/target/arm/helper.c b/target/arm/helper.c index 3f77b40734..f2f329e00a 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -3602,8 +3602,8 @@ static uint64_t do_ats_write(CPUARMState *env, uint64= _t value, * I_MXTJT: Granule protection checks are not performed on the final a= ddress * of a successful translation. */ - ret =3D get_phys_addr_with_space_nogpc(env, value, access_type, mmu_id= x, ss, - &res, &fi); + ret =3D get_phys_addr_with_space_nogpc(env, value, access_type, 0, + mmu_idx, ss, &res, &fi); =20 /* * ATS operations only do S1 or S1+S2 translations, so we never diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 373095a339..9af86da597 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -3559,7 +3559,7 @@ static bool get_phys_addr_gpc(CPUARMState *env, S1Tra= nslate *ptw, } =20 bool get_phys_addr_with_space_nogpc(CPUARMState *env, vaddr address, - MMUAccessType access_type, + MMUAccessType access_type, MemOp memop, ARMMMUIdx mmu_idx, ARMSecuritySpace sp= ace, GetPhysAddrResult *result, ARMMMUFaultInfo *fi) --=20 2.43.0