From nobody Sat Feb 7 04:47:29 2026 Received: from mail.as210286.net (mail.as210286.net [152.53.173.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E37B3009DA for ; Mon, 2 Feb 2026 19:29:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=152.53.173.241 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770060543; cv=none; b=Q/fdq+uL6fz2FE3jCuSr4cmlrJljICnBaUFQfURLQLen7OQNV1By31HRt1py41BU6OIBJPUWiblEvKwFzXm8/r4p8gdZa4OEZ+fg67xt0Wq/MGYrBavytzAO3mnVp2lj+wXgoosxSrKRw6P/wLHLAbbGaJw8CnU3EDWxzyV/Sxg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770060543; c=relaxed/simple; bh=D0vfME0BPNwrJHmAi3NWIJflIUvi5hpUosN/0/1hVZ8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=joE+MYlAo+t1ySTce5D7umJNS79Vxh5D+Em5afF0Tv7NqFNFMWGJvVDZPe8SLfsEFT9CICztIFhsCmQ7R3HlAQNi63ltn8VhLu18xivGRPKfyqKaOIwk3EaZcjffyzR4FuZNXgtqnOSpZcLlDq1HVylT4DW0903PKGU6kD6tQTY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=kleen.org; spf=pass smtp.mailfrom=bohrium.kleen.org; dkim=pass (1024-bit key) header.d=kleen.org header.i=@kleen.org header.b=ASGps35A; arc=none smtp.client-ip=152.53.173.241 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=kleen.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bohrium.kleen.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=kleen.org header.i=@kleen.org header.b="ASGps35A" Received: by mail.as210286.net (Postfix, from userid 993) id A62E2D40161; Mon, 02 Feb 2026 19:21:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kleen.org; s=mail; t=1770060105; bh=D0vfME0BPNwrJHmAi3NWIJflIUvi5hpUosN/0/1hVZ8=; h=From:To:Cc:Subject:Date; b=ASGps35AjKGqSRQ4CRu8FRgGG8pz/cp92uwK8Ps1Cu7iLI9cu4M4xsQpqMbyaGqPB 1VvNirShh6YSshwAzDeSPehTNeYlmULLuEtetkwTxl552vaTdAqgV4LO0PcFCUttkO z22PRARdnM4tduOsGvb1NGSRqJ5xrIKIOYY9i/vA= Received: by bohrium.kleen.org (Postfix, from userid 1000) id 951FC146B1; Mon, 02 Feb 2026 19:21:40 +0000 (UTC) From: Viktor Kleen To: Cc: viktor@kleen.org, David Woodhouse , Lu Baolu , Joerg Roedel , Will Deacon , Robin Murphy , Kevin Tian , Jason Gunthorpe , iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] iommu/vt-d: Treat PAGE_SNOOP and PWSNP separately Date: Mon, 2 Feb 2026 19:21:05 +0000 Message-ID: <20260202192109.1665799-1-viktor@kleen.org> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The PASID_FLAG_PAGE_SNOOP and PASID_FLAG_PWSNP constants are identical. This will cause the pasid code to always set both or neither of the PGSNP and PWSNP bits in PASID table entries. However, PWSNP is a reserved bit if SMPWC is not set in the IOMMU's extended capability register, even if SC is supported. This has resulted in DMAR errors when testing the iommufd code on an Arrow Lake platform. With this patch, those errors disappear and the PASID table entries look correct. Fixes: 101a2854110fa ("iommu/vt-d: Follow PT_FEAT_DMA_INCOHERENT into the P= ASID entry") Signed-off-by: Viktor Kleen Reviewed-by: Jason Gunthorpe --- drivers/iommu/intel/pasid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/intel/pasid.h b/drivers/iommu/intel/pasid.h index b4c85242dc79..3809793e0259 100644 --- a/drivers/iommu/intel/pasid.h +++ b/drivers/iommu/intel/pasid.h @@ -24,7 +24,7 @@ =20 #define PASID_FLAG_NESTED BIT(1) #define PASID_FLAG_PAGE_SNOOP BIT(2) -#define PASID_FLAG_PWSNP BIT(2) +#define PASID_FLAG_PWSNP BIT(3) =20 /* * The PASID_FLAG_FL5LP flag Indicates using 5-level paging for first- --=20 2.51.0