Skip to content

Commit 1f0198f

Browse files
yiliu1765joergroedel
authored andcommitted
iommu/vt-d: Set SSADE when attaching to a parent with dirty tracking
Should set the SSADE (Second Stage Access/Dirty bit Enable) bit of the pasid entry when attaching a device to a nested domain if its parent has already enabled dirty tracking. Fixes: 111bf85 ("iommu/vt-d: Add helper to setup pasid nested translation") Signed-off-by: Yi Liu <[email protected]> Reviewed-by: Joao Martins <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lu Baolu <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent f1e1610 commit 1f0198f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/iommu/intel/pasid.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,8 @@ int intel_pasid_setup_nested(struct intel_iommu *iommu, struct device *dev,
657657
pasid_set_domain_id(pte, did);
658658
pasid_set_address_width(pte, s2_domain->agaw);
659659
pasid_set_page_snoop(pte, !!ecap_smpwc(iommu->ecap));
660+
if (s2_domain->dirty_tracking)
661+
pasid_set_ssade(pte);
660662
pasid_set_translation_type(pte, PASID_ENTRY_PGTT_NESTED);
661663
pasid_set_present(pte);
662664
spin_unlock(&iommu->lock);

0 commit comments

Comments
 (0)