Patch "iommu/vt-d: Disable PCI ATS in legacy passthrough mode" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    iommu/vt-d: Disable PCI ATS in legacy passthrough mode

to the 6.1-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-disable-pci-ats-in-legacy-passthrough-mod.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c77bc80790d78b3019d3adde7f596ac088b1988c
Author: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
Date:   Wed Nov 22 11:26:04 2023 +0800

    iommu/vt-d: Disable PCI ATS in legacy passthrough mode
    
    [ Upstream commit da37dddcf4caf015c400a930301d2ee27a7a15fb ]
    
    When IOMMU hardware operates in legacy mode, the TT field of the context
    entry determines the translation type, with three supported types (Section
    9.3 Context Entry):
    
    - DMA translation without device TLB support
    - DMA translation with device TLB support
    - Passthrough mode with translated and translation requests blocked
    
    Device TLB support is absent when hardware is configured in passthrough
    mode.
    
    Disable the PCI ATS feature when IOMMU is configured for passthrough
    translation type in legacy (non-scalable) mode.
    
    Fixes: 0faa19a1515f ("iommu/vt-d: Decouple PASID & PRI enabling from SVA")
    Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
    Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20231114011036.70142-3-baolu.lu@xxxxxxxxxxxxxxx
    Signed-off-by: Joerg Roedel <jroedel@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index de76272d0fb02..807abf4707be7 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -2517,7 +2517,8 @@ static int domain_add_dev_info(struct dmar_domain *domain, struct device *dev)
 		return ret;
 	}
 
-	iommu_enable_pci_caps(info);
+	if (sm_supported(info->iommu) || !domain_type_is_si(info->domain))
+		iommu_enable_pci_caps(info);
 
 	return 0;
 }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux