From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3CFD82F12AC for ; Fri, 6 Feb 2026 03:07:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770347246; cv=none; b=Y7Dj+h/9VwtK7IZcoBjMVy1139ou1gTBH36xgYphoQFTXnbYI1ZUsBeI5UU9MCQkn65V/LI1se6iaIn8umNwCn4NeXYyOd3GEv05gH0k0cDhTeBahPhjpG9raA7j/giO2vZh0vhrA/i3B3CRjVkz94B1IsMaYv2B/bAFJPBmndM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770347246; c=relaxed/simple; bh=p4tkB2ZlK2UsmWYUfM+N0mNovdhusjrLeAlSeh8H1k8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Usx0vi0LNQLQ0XtIE4Y0Jafc2vW6yLhpT+HjrlMb8fPwpQDuSmY/3FPS0YvpIu5oVyXo63xfg1xDPa9/PugI65rf3YwB6LX99v3I5LGqWDHuFX8+ejNl9OA88ODjJyelnZPW0TCLrdZ7dNC7Ggg/9vCXnCayQAmpdC28j7CQ134= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Ahqqnnjv; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ahqqnnjv" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-2a7a23f5915so11860565ad.2 for ; Thu, 05 Feb 2026 19:07:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770347245; x=1770952045; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=vTLlWgup/boAOL11HN9YevGJP11uRzIBi2lM6iUJUmI=; b=AhqqnnjvSKp5TzooBX0HzBTtiFZ0feX3YedPyjdht2hBBOkOb8ZWRYJPtehe3e7+br PBbqNXuHVulX9L5BJ64grolWz3S7KhntR1TVTnR+bAsZtrq3+rw4QTuisBTJeridlkFk JeOLTfFsp6Lyl3xAoe2t/hN7Js5H9dcnX+6uxPIy5jFJfPctHsZXpXIjvzYSYuI/yiCy Lvxsnz0To+BWEgSv9dk2Uq/ay6ZIn2O2j5iiNT2Z7+F81NEhCa7yy809JxporA+No8KK O44WnDLxIxjtG7yRYuMlOPMrxmCuwrOcO/OgQrQRSO9QevCYUj8RFhV3fRxW9EfAs+8S N2VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770347245; x=1770952045; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=vTLlWgup/boAOL11HN9YevGJP11uRzIBi2lM6iUJUmI=; b=Y0D/eecEBn4RrWDzShA7GMiavGijqCDTLsyzUxmQd8KK+sBEmRLqT4te6J5UvtqAEi aaOyK66MLlgzGKU17sMonCWp2F4gi43S6bv5Qbk5kl0uO/t5kugQPpsNIwKIR7BVp/Oj wzypdyGZFNZr8lXnTeN9gG+I0kezn4+pX11/T35i/GSShrPqXusQYbKi0TEgrOoTxtck 6hGEvCSBYWgBKRikU9VbYvctDGlgw1Ig9LeI4trQvMYPz6wRPImV0/oNGDyhbgNO+nSB lL5oAq3GlubgV3Qn74B2MUMw2bmH8pYXx+styOiWHtWVVLco/qE8BtvJa0zK21dxGoWF j2Mg== X-Forwarded-Encrypted: i=1; AJvYcCXwjB7kWyUnrB01s7seV6CeUZVl6fL2Uy8PyO0pdJE0HxPC6amyt0B9yhOeqaJccZAYvkpCB5EbQG9VrrY=@vger.kernel.org X-Gm-Message-State: AOJu0Yy8zSmHsPKNXUe1Pw0zb6fnQJ3kEsfV28uEzdatXuMK1D+6WiL+ kJW7iBEQBlhxYDXm8q1JhzSP4tdTYRcB6F3i+fOM+h0YRxGi/OmpJWDLl5rQnfaZ X-Gm-Gg: AZuq6aLTi/PJhecsb5h0i1Rb0Z9cZDbSjF40ETTw5l546MeQJN4OA65jvrMfZJjP6Tx NRFnVC/5g5K24CQwbDt1ngRQaQX/7jyhgHuiv8SWC63G5u+lndI5Yhb6baN7nqCNcspqpeQ91p7 QRTJ6chWwS5ODIqcHUpEL31vKfWXE0hZWPBwuHU1Y6/s+881c87P0dXvipYu7DieyhZCwkgW9Bn YqhaOa841HmzAHRKjaoSvdoJ3VSykcZa15b/OOX2xFUViDaXkpSNULHjFkU816E0UpeCYtj7hqh XV3kf5ZydIjBFuuqPQaqoLFIXgPiMY9ceTroLYQgdnXwKjyByLr8fAYId2gIfYnl+UVseqy5eec KKClGh6wLnSbGKBQyH3tKrhFSxu8ZG2cDZSvnpzRrcXPU4J0biKKZ9xiHW8HReuDrK1+xnMrfWp El9FWaemxZq8ePfve05UbaaUqhzpbU71oxnqkv5YQRegE= X-Received: by 2002:a17:902:db08:b0:2a7:d42f:7065 with SMTP id d9443c01a7336-2a9521689bbmr13706725ad.27.1770347245440; Thu, 05 Feb 2026 19:07:25 -0800 (PST) Received: from localhost ([101.44.82.58]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a9521b9bebsm7512525ad.56.2026.02.05.19.07.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Feb 2026 19:07:25 -0800 (PST) Date: Fri, 6 Feb 2026 11:06:57 +0800 From: DaiZhiyuan To: Robin Murphy Cc: Zhiyuan Dai , will@kernel.org, joro@8bytes.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu/arm-smmu-v3: Restrict MMU-700 errata 2268618 and 2812531 to affected Message-ID: <20260206110657.000043f7@gmail.com> In-Reply-To: <3f22f7b8-449c-40d9-b4c8-fff3e520d563@arm.com> References: <20260205093356.4328-1-daizhiyuan@phytium.com.cn> <3f22f7b8-449c-40d9-b4c8-fff3e520d563@arm.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 5 Feb 2026 13:05:24 +0000 Robin Murphy wrote: > On 05/02/2026 9:33 am, Zhiyuan Dai wrote: > > According to SDEN-1786925, Arm errata 2268618 and 2812531 are > > present in r0p0, r0p1, and r1p0, and fixed in r1p1. > > This is a bit fiddly, since these workarounds also overlap some other > errata that IIRC were *not* fixed in r1p1 - it's been on my to-do > list to figure this out for a while now, sorry I haven't had a chance > to get to it. While checking the documentation, I noticed that in SDEN-1786925, document version 19.0 describes the errata as fixed in r1p1. > > > Introduce this patch to avoid performance degradation caused by > > restricting features on unaffected revisions. > > I'm curious, can you clarify the performance impact? At the time I > was pretty sure that the ARM_SMMU_OPT_CMDQ_FORCE_SYNC was just for > safety and never likely to be hit in practice, since with range > invalidations any unmap should never end up with anywhere near 16 > TLBIs in a single batch anyway. Is that no longer the case? > Based on the mailing list, the SMMUv3 implementation now fully supports the Broadcast TLB Maintenance (BTM) feature as part of the Distributed Virtual Memory (DVM) protocol. This allows CPU TLB invalidation instructions to be received by the SMMUv3, which is highly beneficial when the SMMUv3 shares page tables with the CPU (e.g., in Guest SVA use cases). Additionally, while this aligns with the SDEN documentation, please note that we do not have actual benchmark data at this time. > > Signed-off-by: Zhiyuan Dai > > --- > > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 12 +++++++----- > > 1 file changed, 7 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c > > b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index > > d16d35c78c06..7eadb27eb9be 100644 --- > > a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ > > b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -4272,11 +4272,13 > > @@ static void arm_smmu_device_iidr_probe(struct arm_smmu_device > > *smmu) smmu->features &= ~ARM_SMMU_FEAT_NESTING; break; > > case IIDR_PRODUCTID_ARM_MMU_700: > > - /* Arm erratum 2812531 */ > > - smmu->features &= ~ARM_SMMU_FEAT_BTM; > > - smmu->options |= > > ARM_SMMU_OPT_CMDQ_FORCE_SYNC; > > - /* Arm errata 2268618, 2812531 */ > > - smmu->features &= ~ARM_SMMU_FEAT_NESTING; > > + if (variant <= 1 && revision < 0) { > > revision is unsigned, it cannot be < 0. This just breaks the > workarounds entirely. > Logic error: if (variant <= 1 && revision < 0) should be updated to revision < 1. > Thanks, > Robin. > > > + /* Arm erratum 2812531 */ > > + smmu->features &= > > ~ARM_SMMU_FEAT_BTM; > > + smmu->options |= > > ARM_SMMU_OPT_CMDQ_FORCE_SYNC; > > + /* Arm errata 2268618, 2812531 */ > > + smmu->features &= > > ~ARM_SMMU_FEAT_NESTING; > > + } > > break; > > } > > break; > > Best regards, JerryDai.