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 B36C43C141F for ; Sun, 26 Jul 2026 16:23:08 +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=1785082990; cv=none; b=OcXshNRDYYShxC91aQOi8XWBMMn6YgVCYib8FPJh/l8hZziOgpaTLhgyICVi1bzgodqvwXGGkfPbRDhZnNnbgMKW5R6AmlynIW1Pt2YlPOS6bA9VbgdsusIkHNAMY3nsFiqBwXO/bRb2XXpn6cT2wTzgK/ZIJEE+N/7BooWgn9E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785082990; c=relaxed/simple; bh=dqXFXbXUVXKpMi3EZoVlEyKmreyknyy7Kt+mgq6gTXM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ma4vDTiayMQfqx7aL59i8VpkhgMKdpF/ipP9fpa5jXivFUTg90l2FSDKIQvfWxXN4dgvnN/Aozecsd4+CD4ZnSVVSes61kGxQ70ZPQv/PemcVQWzk1AQvDcA5P+5cv5VTDUn/MozSRz9jt7aVejKKbNgmZwUK7/DnT3FO60iFo0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=Bak1hG+F; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="Bak1hG+F" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-2cae1a3a744so14478825ad.3 for ; Sun, 26 Jul 2026 09:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1785082988; x=1785687788; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=FuXTk3sNqgjvfJDVodnQ6dQBc+GEb7krH4jOLDWR1sw=; b=Bak1hG+FBrVx+Ne3PG5zQVLBoJwXtyk41mVwmpP4efjiO0ntUbke7Zup6sfGPSnt2v +UqEROtTQVxefwtDQmSoo3Ul8S8tEH7yiP9BRb8oy1pWPgUqnVVHrunTu/kQtymfgnoh hDZj9ttmWXNcXPgawPxKLhtRmZ2baiI8R+/JjZ5M4mEaJS3GNQc3D1IgzYto+3I0KS7S Pt5/mCqS7PiLXGKmmFxNfn59ZtiZkLflsLvn3nXxhQGz2ln+1lrBhPSrh2F1fYx0/IgO pF3vRCcmbuzMXGN9wUeEQFUVE7BvI6Z+ZTUNZFRRu8oe6PA4evqLWd1JjeWTpLXMUGfz YuLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785082988; x=1785687788; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=FuXTk3sNqgjvfJDVodnQ6dQBc+GEb7krH4jOLDWR1sw=; b=YNzN+Ai8kkX5EA2N0opibZHy9opf7JyYkiKvTxB5g0pAkVbK+TjNKC8UWiwX56xnVF 5tr7P/6D1Gs3Thko0FwhKCU3UeaPupha0H4uNHyd+qO6b9gzq0lQC0HYIyhSB18s3Aps FMVh4TCMVOWI19X+qr2hL1mVW0AMI398v6dHyz8nlY1bSZaSrwJ57qYIUqM7CkVORH/H op8crjJOymVco25hgk6jXRyQYV2NJXmZEvjKn8M0Ozr0FQMmRlptDzNPK76eo1REBOtW 2FRChNkE7crelf1q1JrHA7DGIJ6XBgfAUxOOWKXSHlWayxyxrfCypTKAwBQWTWIQIheJ hFkg== X-Forwarded-Encrypted: i=1; AHgh+RpKl0Kn3t47nMdNTejXhX23aqI4mqEdMqxRJUwlIMKbHTLx3YvzcEUal/h6U29jQQWe0SDSKM/9N0yfYAo=@vger.kernel.org X-Gm-Message-State: AOJu0YxUVHUBFr2zwKvfpvPHcEhwUEE99BDU7WzxkmAnu6doYRQa65sy Rf6CCUyF4uqMF98XujIKHAu3xIGV3GJDS8yC+m8CT4pzntZF1tB5c9WQSRyVzDJMiR3fgxbSepl BZMYT X-Gm-Gg: AR+sD11lqvrBo249odCggab8V9x/hEMVvBqVp/rJoK+uhZO173KW62YSuQ9FxbfgN6l FpLSGfkIwc+/A10PyW6WHyU0c5L3ZKQNYJbNBqhdHjRPb7A1Z/y1oivjC8Vhc765Z/iVYhrHVom XpzxjVxbJM+r6GnC2KqOiTWiZam6ihVoSebKEDiRols4+IphdszJj9XcSZqk5UFEzxHgYvlnyLF poIQAjawOUIQCiJ0azJdtamLtVNg0fE4YxNoy56mfgf56FGx4n+vqvSuQ1+mnpUbavrKzSElR9I K1hzu5+B8B6HI/BI2ZnkEs76ht1JDz2vxDnCLRSCc+n/6R+O7NZCViGo4ArAcfSumWxexojyLgH 0iEgCcenypQwHggqheGDe1SNWu4D1BEFtm9imKx9KcwlJhHL2XoI= X-Received: by 2002:a17:903:4687:b0:2b7:975c:dacc with SMTP id d9443c01a7336-2cfde79058fmr52053305ad.1.1785082988138; Sun, 26 Jul 2026 09:23:08 -0700 (PDT) Received: from ziepe.ca ([64.114.68.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2cfde80f50asm21426485ad.77.2026.07.26.09.23.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jul 2026 09:23:07 -0700 (PDT) Received: from jgg by jggl with local (Exim 4.95) (envelope-from ) id 1wo1d5-0001Tl-8m; Sun, 26 Jul 2026 13:23:07 -0300 Date: Sun, 26 Jul 2026 13:23:07 -0300 From: Jason Gunthorpe To: Ashish Mhetre Cc: catalin.marinas@arm.com, will@kernel.org, corbet@lwn.net, skhan@linuxfoundation.org, robin.murphy@arm.com, joro@8bytes.org, nicolinc@nvidia.com, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-tegra@vger.kernel.org Subject: Re: [PATCH v9 3/4] iommu/arm-smmu-v3-iommufd: Report CFGI/TLBI-repeat erratum Message-ID: References: <20260726081904.1408859-1-amhetre@nvidia.com> <20260726081904.1408859-4-amhetre@nvidia.com> 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-Disposition: inline In-Reply-To: <20260726081904.1408859-4-amhetre@nvidia.com> On Sun, Jul 26, 2026 at 08:19:03AM +0000, Ashish Mhetre wrote: > A guest with access to VCMDQ generates its own invalidation commands > and must apply any invalidation errata before submitting them. If the > host also repeats those commands, each affected invalidation is issued > four times instead of twice. > > Add IOMMU_HW_INFO_ARM_SMMUV3_ERRATA_REPEAT_TLBI_CFGI to report the > CFGI/TLBI-repeat erratum to user space. This allows the VMM to expose > the erratum to the guest or apply the workaround itself. > > Use the raw __arm_smmu_cmdq_issue_cmdlist() helper for user-provided > invalidations so the host does not apply the workaround a second time. > Add arm_smmu_erratum_repeat_tlbi_cfgi() to query the static key when > populating the SMMUv3 hardware information. > > Signed-off-by: Ashish Mhetre > --- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c | 7 +++++-- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 7 ++++++- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 1 + > include/uapi/linux/iommufd.h | 13 ++++++++++++- > 4 files changed, 24 insertions(+), 4 deletions(-) Reviewed-by: Jason Gunthorpe Jason