From nobody Thu May  8 08:20:39 2025
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=1740506884; cv=none;
	d=zohomail.com; s=zohoarc;
	b=PvKk8F3+pJtV6YpJpu272f2MPtYonyfm6SCd+8x3g6RMW6wV1XfvheBXQrnbLGLC97TlB6dsn6q9OsyW5k0wX7j9i3uBisdQOnc76vPAGK9q5UFoT0U1c2eVXSJRvLMClPmQg7dK237Zp5aB9/IYX68KPzNV153c1l4SO/W29ZE=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc;
	t=1740506884;
 h=Content-Transfer-Encoding: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:Cc;
	bh=Yxn9ofMo25WYq7dF2Vjj2JTu1cwoC9F4JXJ3NPkXp1k=;
	b=CKeulFfcd/cOqGKF2Dd2nJDSpN6hTzdjTBHNATXKS3rSlCy0agst4bNuMDBF6ZS/xMdokKKQPUPN0wDZVkZVGrVrEZhsxLfeSCXEpadEsVMZ7FREpwSquJW/MG8ieFGssrOoMOumX8H7AP/dOA7lyH4/yEY4DX0qrJAq9yojxcY=
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=<peter.maydell@linaro.org> (p=none dis=none)
Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org>
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by
 mx.zohomail.com
	with SMTPS id 174050688481356.1755804481146;
 Tue, 25 Feb 2025 10:08:04 -0800 (PST)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <qemu-devel-bounces@nongnu.org>)
	id 1tmzL2-0002IV-An; Tue, 25 Feb 2025 13:07:24 -0500
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 <peter.maydell@linaro.org>)
 id 1tmzJ0-0008B5-1U
 for qemu-devel@nongnu.org; Tue, 25 Feb 2025 13:05:19 -0500
Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <peter.maydell@linaro.org>)
 id 1tmzIy-0002Bi-BG
 for qemu-devel@nongnu.org; Tue, 25 Feb 2025 13:05:17 -0500
Received: by mail-wm1-x334.google.com with SMTP id
 5b1f17b1804b1-439a4fc2d65so57827005e9.3
 for <qemu-devel@nongnu.org>; Tue, 25 Feb 2025 10:05:15 -0800 (PST)
Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2])
 by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-43ab156a136sm35147875e9.35.2025.02.25.10.05.12
 for <qemu-devel@nongnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 25 Feb 2025 10:05:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=linaro.org; s=google; t=1740506714; x=1741111514; darn=nongnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=Yxn9ofMo25WYq7dF2Vjj2JTu1cwoC9F4JXJ3NPkXp1k=;
 b=bl34Zr+WjOITsj9Ca+wSlFU8AsFhIGifwwphTbSVFmtqfrN146/mKY4HUVVG6H1VHm
 bqIm0pIuPYKdDc5iOx469sx63/hr+0I6NFi9vhZOVRVwTqkwXIqWSbeX4VKBOjoJunmn
 UhucwzwaSBDwUfPiS39Se9P+nja4v8MjbHejDnBiJmF/OtDnGLuDZ2d2bVJeKJmkn19+
 R1v9ATdzqJtyN9f3MGpRzQzNVq68ZrZJLNbH95Omo0nYvXCX720FhS0rT6xYVUNZ+w5R
 UV056NaKuT86gnxm0KIz5WaUN4eQbOBxWVuTFHRsJDMNFj16cqhvcFzyuKHlLUda0G6p
 YYbg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1740506714; x=1741111514;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=Yxn9ofMo25WYq7dF2Vjj2JTu1cwoC9F4JXJ3NPkXp1k=;
 b=xB1UzObgwPsnfOZPJByJuMLMHpByGdH6jv+zVKYy4/oTjHUMoBesgu6VCiIl8VIqXy
 N3SZh1x3a/ZAyUHztQmFhHq4t8VPJY54y6D8jNu1623wJdoYjX6kx3t+i5FoNIbhopQf
 bqD0pIIkE5jXzZAYXzImg6AxEXg4o3iDZIFmAAVYuSJRbijtagBP0K+sRIPYaMjALJge
 0jJBUkjHUnjVt9i0H/ZVaI8XtkAPpOh7BqXlkr17QFNynNCCnzihNu0a93HKk+HUvQcK
 5C8fiN/sYfHEXhjC67kEKNU7DofZ3V2dPVowDNcBd3zre87xOlA0tN0z/E+gWiQa7DVH
 YNUw==
X-Gm-Message-State: AOJu0Ywx7wMPA45uDBV1qjuTVDBTPb6lDCQrcMagYTAUaQsnl5g5tMbB
 xo5cIPSfxSMyAg54tDCmCQs+S5dO858Ing0GhE5X4S8sRyA1ybOzFMDmYGKogvmKVxofgQnS7Pl
 O
X-Gm-Gg: ASbGncvl2LOI7i17U6L/Ec2YzFLw+aEeODpPFaTqrpYHISRd45ALGiArctXN0o8Dnve
 pOTm42DpxNxeQirf8Z1R/InmOk/yP8u9lRF6MDUksHIyLDqO5fXjgkjEd3G2aPV+SK64oZYq+Xq
 xMce0UJ4RZyrbHrjAB/WC1LdjfHUOx/X/CjzRDRHC/QJEV9HLRW7IEJSd6xQ0cQNQZggA2YP4EB
 4epDZhMl+Ya11fgs2dv67a0cROGJcvataOuL5+7pD4LIK1dAnLClYFR7DQ8Ewco6ICGZKKg1e6u
 6SU8W4JSoNbIZf0SAPu0qtBnjqdxC4GA
X-Google-Smtp-Source: 
 AGHT+IHkzLD5ajZr0wOXczBWkQNn2+Dy9nkfKfXw/R5ZYRpQijzOSTToQt8uVaFr4lg+ydKYcRki4w==
X-Received: by 2002:a05:600c:3114:b0:439:9b80:ca6f with SMTP id
 5b1f17b1804b1-43ab0f255a3mr49938835e9.5.1740506714354;
 Tue, 25 Feb 2025 10:05:14 -0800 (PST)
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PULL 01/43] hw/arm/smmuv3: Fill u.f_cd_fetch.addr for
 SMMU_EVT_F_CD_FETCH
Date: Tue, 25 Feb 2025 18:04:27 +0000
Message-ID: <20250225180510.1318207-2-peter.maydell@linaro.org>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20250225180510.1318207-1-peter.maydell@linaro.org>
References: <20250225180510.1318207-1-peter.maydell@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=2a00:1450:4864:20::334;
 envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.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: <qemu-devel.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>,
 <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>
List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel>
List-Post: <mailto:qemu-devel@nongnu.org>
List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>,
 <mailto:qemu-devel-request@nongnu.org?subject=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: 1740506886927019100
Content-Type: text/plain; charset="utf-8"

From: Nicolin Chen <nicolinc@nvidia.com>

When we fill in the SMMUEventInfo for SMMU_EVT_F_CD_FETCH we write
the address into the f_ste_fetch member of the union, but then when
we come to read it back in smmuv3_record_event() we will (correctly)
be using the f_cd_fetch member.

This is more like a cosmetics fix since the f_cd_fetch and f_ste_fetch are
basically the same field since they are in the exact same union with exact
same type, but it's conceptually wrong. Use the correct union member.

Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Message-id: 20250220213832.80289-1-nicolinc@nvidia.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/arm/smmuv3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
index b49a59b64c2..b40acbe0245 100644
--- a/hw/arm/smmuv3.c
+++ b/hw/arm/smmuv3.c
@@ -377,7 +377,7 @@ static int smmu_get_cd(SMMUv3State *s, STE *ste, SMMUTr=
ansCfg *cfg,
         qemu_log_mask(LOG_GUEST_ERROR,
                       "Cannot fetch pte at address=3D0x%"PRIx64"\n", addr);
         event->type =3D SMMU_EVT_F_CD_FETCH;
-        event->u.f_ste_fetch.addr =3D addr;
+        event->u.f_cd_fetch.addr =3D addr;
         return -EINVAL;
     }
     for (i =3D 0; i < ARRAY_SIZE(buf->word); i++) {
--=20
2.43.0