* Re: [PATCH 1/1] iommu/vt-d: Disallow SVA if page walk is not coherent
2026-07-16 5:35 [PATCH 1/1] iommu/vt-d: Disallow SVA if page walk is not coherent Lu Baolu
@ 2026-07-16 14:27 ` Jason Gunthorpe
2026-07-16 19:50 ` Samiullah Khawaja
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2026-07-16 14:27 UTC (permalink / raw)
To: Lu Baolu
Cc: Joerg Roedel, Will Deacon, Robin Murphy, Kevin Tian, iommu,
linux-kernel, stable
On Thu, Jul 16, 2026 at 01:35:53PM +0800, Lu Baolu wrote:
> Hardware implementations report Scalable-Mode Page-walk Coherency Support
> via the SMPWCS field in the extended capability register. If the hardware
> does not support page-walk coherency, a clflush is required every time
> the page table entries (which are walked by the IOMMU hardware) are
> updated.
>
> In the SVA case, page tables are managed by the CPU mm core, not by the
> IOMMU driver. Because the IOMMU driver has no way of knowing whether the
> CPU page table management code has ensured coherency via clflush, the
> driver must deny SVA if the hardware does not support coherent paging.
>
> Fixes: ff3dc6521f78 ("iommu/vt-d: Fix CPU and IOMMU SVM feature matching checks")
> Cc: stable@vger.kernel.org
> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> ---
> drivers/iommu/intel/svm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 1/1] iommu/vt-d: Disallow SVA if page walk is not coherent
2026-07-16 5:35 [PATCH 1/1] iommu/vt-d: Disallow SVA if page walk is not coherent Lu Baolu
2026-07-16 14:27 ` Jason Gunthorpe
@ 2026-07-16 19:50 ` Samiullah Khawaja
2026-07-17 8:04 ` Tian, Kevin
2026-07-21 12:21 ` Will Deacon
3 siblings, 0 replies; 5+ messages in thread
From: Samiullah Khawaja @ 2026-07-16 19:50 UTC (permalink / raw)
To: Lu Baolu
Cc: Joerg Roedel, Will Deacon, Robin Murphy, Jason Gunthorpe,
Kevin Tian, iommu, linux-kernel, stable
On Thu, Jul 16, 2026 at 01:35:53PM +0800, Lu Baolu wrote:
>Hardware implementations report Scalable-Mode Page-walk Coherency Support
>via the SMPWCS field in the extended capability register. If the hardware
>does not support page-walk coherency, a clflush is required every time
>the page table entries (which are walked by the IOMMU hardware) are
>updated.
>
>In the SVA case, page tables are managed by the CPU mm core, not by the
>IOMMU driver. Because the IOMMU driver has no way of knowing whether the
>CPU page table management code has ensured coherency via clflush, the
>driver must deny SVA if the hardware does not support coherent paging.
>
>Fixes: ff3dc6521f78 ("iommu/vt-d: Fix CPU and IOMMU SVM feature matching checks")
>Cc: stable@vger.kernel.org
>Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
>---
> drivers/iommu/intel/svm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c
>index 0636987f03c8..432e35723ce9 100644
>--- a/drivers/iommu/intel/svm.c
>+++ b/drivers/iommu/intel/svm.c
>@@ -27,7 +27,7 @@
>
> void intel_svm_check(struct intel_iommu *iommu)
> {
>- if (!pasid_supported(iommu))
>+ if (!pasid_supported(iommu) || !ecap_smpwc(iommu->ecap))
> return;
>
> if (cpu_feature_enabled(X86_FEATURE_GBPAGES) &&
>--
>2.43.0
>
>
Reviewed-by: Samiullah Khawaja <skhawaja@google.com>
Thanks,
Sami
^ permalink raw reply [flat|nested] 5+ messages in thread* RE: [PATCH 1/1] iommu/vt-d: Disallow SVA if page walk is not coherent
2026-07-16 5:35 [PATCH 1/1] iommu/vt-d: Disallow SVA if page walk is not coherent Lu Baolu
2026-07-16 14:27 ` Jason Gunthorpe
2026-07-16 19:50 ` Samiullah Khawaja
@ 2026-07-17 8:04 ` Tian, Kevin
2026-07-21 12:21 ` Will Deacon
3 siblings, 0 replies; 5+ messages in thread
From: Tian, Kevin @ 2026-07-17 8:04 UTC (permalink / raw)
To: Lu Baolu, Joerg Roedel, Will Deacon, Robin Murphy,
Jason Gunthorpe
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
> From: Lu Baolu <baolu.lu@linux.intel.com>
> Sent: Thursday, July 16, 2026 1:36 PM
>
> Hardware implementations report Scalable-Mode Page-walk Coherency
> Support
> via the SMPWCS field in the extended capability register. If the hardware
> does not support page-walk coherency, a clflush is required every time
> the page table entries (which are walked by the IOMMU hardware) are
> updated.
>
> In the SVA case, page tables are managed by the CPU mm core, not by the
> IOMMU driver. Because the IOMMU driver has no way of knowing whether
> the
> CPU page table management code has ensured coherency via clflush, the
> driver must deny SVA if the hardware does not support coherent paging.
>
> Fixes: ff3dc6521f78 ("iommu/vt-d: Fix CPU and IOMMU SVM feature
> matching checks")
> Cc: stable@vger.kernel.org
> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 1/1] iommu/vt-d: Disallow SVA if page walk is not coherent
2026-07-16 5:35 [PATCH 1/1] iommu/vt-d: Disallow SVA if page walk is not coherent Lu Baolu
` (2 preceding siblings ...)
2026-07-17 8:04 ` Tian, Kevin
@ 2026-07-21 12:21 ` Will Deacon
3 siblings, 0 replies; 5+ messages in thread
From: Will Deacon @ 2026-07-21 12:21 UTC (permalink / raw)
To: Joerg Roedel, Robin Murphy, Jason Gunthorpe, Kevin Tian, Lu Baolu
Cc: catalin.marinas, kernel-team, Will Deacon, iommu, linux-kernel,
stable
On Thu, 16 Jul 2026 13:35:53 +0800, Lu Baolu wrote:
> Hardware implementations report Scalable-Mode Page-walk Coherency Support
> via the SMPWCS field in the extended capability register. If the hardware
> does not support page-walk coherency, a clflush is required every time
> the page table entries (which are walked by the IOMMU hardware) are
> updated.
>
> In the SVA case, page tables are managed by the CPU mm core, not by the
> IOMMU driver. Because the IOMMU driver has no way of knowing whether the
> CPU page table management code has ensured coherency via clflush, the
> driver must deny SVA if the hardware does not support coherent paging.
>
> [...]
Applied to iommu (fixes), thanks!
[1/1] iommu/vt-d: Disallow SVA if page walk is not coherent
https://git.kernel.org/iommu/c/780dfed68862
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
^ permalink raw reply [flat|nested] 5+ messages in thread