From nobody Tue Feb 10 13:17:57 2026 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=1664292920; cv=none; d=zohomail.com; s=zohoarc; b=DOjUqOQDwDFaefNejW5lSBTXDkxc/qiGrsjKTVD/jSWFjkUA8LE85Zmrfn6mkTdz3obY6P440Yw2kbr255wPZHCdklyzVEzro3jgUCrPkBtZIi8mp4u6tcNGdulScVylM0T7P7cPLl6Ejvw8OqvIU08EO2iRVg3yYCKCeE2BzOk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664292920; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kwIb/itvs3rKbwTJEqXho8uP1946GYiAG+/duWCVn30=; b=bmrLmUZLQjlMmLcdnpZjrb8icl1k6i8i7DK5Q07xuORVTr2ClJ+8gMaTdHdgLeBXPxC+6HjBL4FYjgj8LaM/fUq+KJZc4w58rHA//A5K6ZpF4X87CtrZxtlWIEI7/oTubk51hGpPi+9049nK51xJiN3mtohgQO4uPQePg83z2CU= 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 1664292920520222.32351210057914; Tue, 27 Sep 2022 08:35:20 -0700 (PDT) Received: from localhost ([::1]:53102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odCcA-00056x-66 for importer@patchew.org; Tue, 27 Sep 2022 11:35:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odBMe-00053z-OS for qemu-devel@nongnu.org; Tue, 27 Sep 2022 10:15:13 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:52114) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odBMc-0005zB-44 for qemu-devel@nongnu.org; Tue, 27 Sep 2022 10:15:12 -0400 Received: by mail-wm1-x335.google.com with SMTP id o5so6648626wms.1 for ; Tue, 27 Sep 2022 07:15:09 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id d16-20020adff850000000b0022ae59d472esm1853489wrq.112.2022.09.27.07.15.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 07:15:06 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 775281FFBA; Tue, 27 Sep 2022 15:15:05 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=kwIb/itvs3rKbwTJEqXho8uP1946GYiAG+/duWCVn30=; b=W9SC7/+Tf5OCooTlzhP4Sis/4s2IihlstIcDh0P59xQeUidh5CSTHMWMDbH8stIAw1 yeHHLR5Ha4Mi1aBjzZRFlA0vV+MkztOchTrhVfvL+NjG2muHVbno3etCyyvETewjIRet c2+IQOl/hGHtn7aXE/dfxOjM2WvDBwW+Khmp24YNup5gwrstuW4Hbw08IPS1pBxEWEHW FxkvJxgzPemAcIV0szrbH7+JSsKcpaIzNY0p5y8/DiTg95sN9zW0IIJibb/xsHvbmB19 DWy3EQB3tMOE74BcDzebTxkG1wnV1vqCZhoqjs/KdLRpXmQT+ngtqWoCo5Iq6oxE24Gh 4ECQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=kwIb/itvs3rKbwTJEqXho8uP1946GYiAG+/duWCVn30=; b=VkQqegUoGlp7U0JBQwJ+fImRXSW8yPXl8Dxch4r0OWXFNqYvRl44xfqngZw4hMUKiW dZ84AQRlYuhAACvVkJvBAu1D5rWzXBMy/SfmtHYPcNl2c6YDA3UIJqVGh2YAyhJ4uaBo UYnn1wx2BbUOQvoGCZQ8XzsWUYCLPyCLPPD44oldPZ22bLljTNztfYBiUvwXxv5b/Q/m rlVp2POIpdvTAMkUz7bJ3Ie9JzZzBQIcADpWjBuWgcDRveBQ/hsYHsnqzwsZ2QPTzNoc Hl83JtJrDduii+Lq5RQHFPqVKbJ/NSbBRvcsbJoBD+jOGYxXP58SwftR0MWoqX3or4oe UIjw== X-Gm-Message-State: ACrzQf3IXSWnQShWQPhQyJDW//wAIhmPJTP7tmx7ooUY4eOTROwFx2Yk y8u352VkRm15sYR7aGo83QXDXmX9VMSBTw== X-Google-Smtp-Source: AMsMyM7DYiLQ+7glLilZarpUd+3QCck5pzjzpEcXHejIfZJdndjTFd6Ymc1ZvPjRVjH7vCQ9Eor6Bw== X-Received: by 2002:a05:600c:1ca0:b0:3a8:41cf:a31f with SMTP id k32-20020a05600c1ca000b003a841cfa31fmr2960353wms.161.1664288108496; Tue, 27 Sep 2022 07:15:08 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Peter Maydell Subject: [PATCH v3 02/15] target/arm: ensure TCG IO accesses set appropriate MemTxAttrs Date: Tue, 27 Sep 2022 15:14:51 +0100 Message-Id: <20220927141504.3886314-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220927141504.3886314-1-alex.bennee@linaro.org> References: <20220927141504.3886314-1-alex.bennee@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=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.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" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1664292921944100001 Both arm_cpu_tlb_fill (for normal IO) and arm_cpu_get_phys_page_attrs_debug (for debug access) come through get_phys_addr which is setting the other memory attributes for the transaction. As these are all by definition CPU accesses we can also set the requested_type/index as appropriate. Signed-off-by: Alex Benn=C3=A9e --- v3 - reword commit summary --- target/arm/ptw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 2ddfc028ab..4b0dc9bd14 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -2289,6 +2289,9 @@ bool get_phys_addr(CPUARMState *env, target_ulong add= ress, ARMMMUIdx s1_mmu_idx =3D stage_1_mmu_idx(mmu_idx); bool is_secure =3D regime_is_secure(env, mmu_idx); =20 + attrs->requester_type =3D MEMTXATTRS_CPU; + attrs->requester_id =3D env_cpu(env)->cpu_index; + if (mmu_idx !=3D s1_mmu_idx) { /* * Call ourselves recursively to do the stage 1 and then stage 2 --=20 2.34.1