summaryrefslogtreecommitdiff
path: root/rust/helpers/bitops.c
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2025-09-26 10:41:30 +0800
committerJoerg Roedel <joerg.roedel@amd.com>2025-09-26 10:02:26 +0200
commit57f55048e564dedd8a4546d018e29d6bbfff0a7e (patch)
tree23269ba5a2b011118e555a7a621d96d7b92a4db0 /rust/helpers/bitops.c
parent5bd5ab53e7b8c87908341accb3ad8da555d6b778 (diff)
iommu/vt-d: Disallow dirty tracking if incoherent page walk
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: f35f22cc760e ("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>
Diffstat (limited to 'rust/helpers/bitops.c')
0 files changed, 0 insertions, 0 deletions