Re: [PATCH v1] iommu/vt-d: Remove redundant SLTS cap check for nested and dirty tracking

From: Jason Gunthorpe
Date: Fri Jun 06 2025 - 13:15:40 EST


On Thu, Jun 05, 2025 at 06:10:52PM +0800, Wei Wang wrote:
> In intel_iommu_domain_alloc_paging_flags():
> For the nested_parent case, nested_supported() has been check earlier,
> and for the dirty_tracking case, ssads_supported() has been check earlier.
> Both of these imply SLTS support, making the subsequent SLTS cap check
> redundant.
> Also, false-initialize the first_stage boolean to simplify the code.
>
> Signed-off-by: Wei Wang <wei.w.wang@xxxxxxxxx>
> ---
> drivers/iommu/intel/iommu.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)

I'm going to post a patch that fixes this (and the other one you sent)
differently next week:

https://github.com/jgunthorpe/linux/commits/iommu_pt_vtd/

iommu/vtd: Split intel_iommu_domain_alloc_paging_flags()

Jason