* [PATCH 0/1] [PULL REQUEST] iommu/vt-d: Fixes for v6.18-rc1
@ 2025-09-26 2:41 Lu Baolu
2025-09-26 2:41 ` [PATCH 1/1] iommu/vt-d: Disallow dirty tracking if incoherent page walk Lu Baolu
2025-09-26 8:03 ` [PATCH 0/1] [PULL REQUEST] iommu/vt-d: Fixes for v6.18-rc1 Joerg Roedel
0 siblings, 2 replies; 3+ messages in thread
From: Lu Baolu @ 2025-09-26 2:41 UTC (permalink / raw)
To: Joerg Roedel; +Cc: iommu, linux-kernel
Hi Joerg,
The following fix has been queued for the Intel iommu driver. It aims to
solve the following problem:
- Disallow dirty tracking if page walk is incoherent
This fix is not so critical for v6.17-rc. Considering the upcoming merge
window, it would be fine to include them with other patches for v6.18.
Please consider it.
Best regards,
baolu
Lu Baolu (1):
iommu/vt-d: Disallow dirty tracking if incoherent page walk
drivers/iommu/intel/iommu.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] iommu/vt-d: Disallow dirty tracking if incoherent page walk
2025-09-26 2:41 [PATCH 0/1] [PULL REQUEST] iommu/vt-d: Fixes for v6.18-rc1 Lu Baolu
@ 2025-09-26 2:41 ` Lu Baolu
2025-09-26 8:03 ` [PATCH 0/1] [PULL REQUEST] iommu/vt-d: Fixes for v6.18-rc1 Joerg Roedel
1 sibling, 0 replies; 3+ messages in thread
From: Lu Baolu @ 2025-09-26 2:41 UTC (permalink / raw)
To: Joerg Roedel; +Cc: iommu, linux-kernel
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
---
drivers/iommu/intel/iommu.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/intel/iommu.h b/drivers/iommu/intel/iommu.h
index d09b92871659..2c261c069001 100644
--- a/drivers/iommu/intel/iommu.h
+++ b/drivers/iommu/intel/iommu.h
@@ -541,7 +541,8 @@ enum {
#define pasid_supported(iommu) (sm_supported(iommu) && \
ecap_pasid((iommu)->ecap))
#define ssads_supported(iommu) (sm_supported(iommu) && \
- ecap_slads((iommu)->ecap))
+ ecap_slads((iommu)->ecap) && \
+ ecap_smpwc(iommu->ecap))
#define nested_supported(iommu) (sm_supported(iommu) && \
ecap_nest((iommu)->ecap))
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 0/1] [PULL REQUEST] iommu/vt-d: Fixes for v6.18-rc1
2025-09-26 2:41 [PATCH 0/1] [PULL REQUEST] iommu/vt-d: Fixes for v6.18-rc1 Lu Baolu
2025-09-26 2:41 ` [PATCH 1/1] iommu/vt-d: Disallow dirty tracking if incoherent page walk Lu Baolu
@ 2025-09-26 8:03 ` Joerg Roedel
1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2025-09-26 8:03 UTC (permalink / raw)
To: Lu Baolu; +Cc: iommu, linux-kernel
On Fri, Sep 26, 2025 at 10:41:29AM +0800, Lu Baolu wrote:
> Lu Baolu (1):
> iommu/vt-d: Disallow dirty tracking if incoherent page walk
Applied, thanks Baolu.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-26 8:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-26 2:41 [PATCH 0/1] [PULL REQUEST] iommu/vt-d: Fixes for v6.18-rc1 Lu Baolu
2025-09-26 2:41 ` [PATCH 1/1] iommu/vt-d: Disallow dirty tracking if incoherent page walk Lu Baolu
2025-09-26 8:03 ` [PATCH 0/1] [PULL REQUEST] iommu/vt-d: Fixes for v6.18-rc1 Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox