linux/drivers/iommu/intel
Lu Baolu 8d096ce0e8 iommu/vt-d: Disallow dirty tracking if incoherent page walk
[ Upstream commit 57f55048e5 ]

Dirty page tracking relies on the IOMMU atomically updating the dirty bit
in the paging-structure entry. For this operation to succeed, the paging-
structure memory must be coherent between the IOMMU and the CPU. In
another word, if the iommu page walk is incoherent, dirty page tracking
doesn't work.

The Intel VT-d specification, Section 3.10 "Snoop Behavior" states:

"Remapping hardware encountering the need to atomically update A/EA/D bits
 in a paging-structure entry that is not snooped will result in a non-
 recoverable fault."

To prevent an IOMMU from being incorrectly configured for dirty page
tracking when it is operating in an incoherent mode, mark SSADS as
supported only when both ecap_slads and ecap_smpwc are supported.

Fixes: f35f22cc76 ("iommu/vt-d: Access/Dirty bit support for SS domains")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20250924083447.123224-1-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-10-15 12:04:09 +02:00
..
cache.c IOMMU Updates for Linux v6.17: 2025-07-30 10:42:00 -07:00
debugfs.c iommu/vt-d: debugfs: Fix legacy mode page table dump logic 2025-10-15 12:04:03 +02:00
dmar.c iommu/vt-d: Remove the CONFIG_X86 wrapping from iommu init hook 2025-07-14 11:18:03 +01:00
iommu.c iommu/vt-d: Fix __domain_mapping()'s usage of switch_to_super_page() 2025-09-05 15:11:08 +02:00
iommu.h iommu/vt-d: Disallow dirty tracking if incoherent page walk 2025-10-15 12:04:09 +02:00
irq_remapping.c ARM: 2025-07-30 17:14:01 -07:00
Kconfig iommu/vt-d: Move IOMMU_IOPF into INTEL_IOMMU 2024-11-05 13:32:26 +01:00
Makefile iommu: make inclusion of intel directory conditional 2025-05-16 08:46:46 +02:00
nested.c iommu/vt-d: Create unique domain ops for each stage 2025-07-14 11:18:03 +01:00
pasid.c iommu/vt-d: Lift the __pa to domain_setup_first_level/intel_svm_set_dev_pasid() 2025-07-14 11:18:03 +01:00
pasid.h iommu/vt-d: Lift the __pa to domain_setup_first_level/intel_svm_set_dev_pasid() 2025-07-14 11:18:03 +01:00
perf.c iommu/vt-d: Use kcalloc() instead of kzalloc() 2024-03-01 13:51:18 +01:00
perf.h iommu/vt-d: Remove debugfs use of private data field 2024-04-26 11:57:38 +02:00
perfmon.c iommu/vt-d: Clean up cpumask and hotplug for perfmon 2024-09-10 11:44:13 +02:00
perfmon.h iommu/vt-d: Add IOMMU perfmon support 2023-02-03 11:06:06 +01:00
prq.c iommu/vtd: Remove iommu_alloc_pages_node() 2025-04-17 16:22:54 +02:00
svm.c iommu/vt-d: Create unique domain ops for each stage 2025-07-14 11:18:03 +01:00
trace.c iommu/vt-d: Move trace/events/intel_iommu.h under iommu 2022-07-15 10:21:28 +02:00
trace.h iommu/vt-d: Deduplicate cache_tag_flush_all by reusing flush_range 2025-07-14 11:18:04 +01:00