This is a note to let you know that I've just added the patch titled iommu/vt-d: Set SSADE when attaching to a parent with dirty tracking to the 6.7-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: iommu-vt-d-set-ssade-when-attaching-to-a-parent-with.patch and it can be found in the queue-6.7 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 859b57e27effd53ed488091a7856f7a715eeecb8 Author: Yi Liu <yi.l.liu@xxxxxxxxx> Date: Mon Feb 19 19:16:00 2024 +0800 iommu/vt-d: Set SSADE when attaching to a parent with dirty tracking [ Upstream commit 1f0198fce68340e0da2d438f4ea9fc20d2c958da ] 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: 111bf85c68f6 ("iommu/vt-d: Add helper to setup pasid nested translation") Signed-off-by: Yi Liu <yi.l.liu@xxxxxxxxx> Reviewed-by: Joao Martins <joao.m.martins@xxxxxxxxxx> Link: https://lore.kernel.org/r/20240208091414.28133-1-yi.l.liu@xxxxxxxxx Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx> Signed-off-by: Joerg Roedel <jroedel@xxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/iommu/intel/pasid.c b/drivers/iommu/intel/pasid.c index 9f8f389ff255c..6e102cbbde845 100644 --- a/drivers/iommu/intel/pasid.c +++ b/drivers/iommu/intel/pasid.c @@ -925,6 +925,8 @@ int intel_pasid_setup_nested(struct intel_iommu *iommu, struct device *dev, pasid_set_domain_id(pte, did); pasid_set_address_width(pte, s2_domain->agaw); pasid_set_page_snoop(pte, !!ecap_smpwc(iommu->ecap)); + if (s2_domain->dirty_tracking) + pasid_set_ssade(pte); pasid_set_translation_type(pte, PASID_ENTRY_PGTT_NESTED); pasid_set_present(pte); spin_unlock(&iommu->lock);