Patch "iommu/vt-d: Allow zero SAGAW if second-stage not supported" 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: Allow zero SAGAW if second-stage not supported

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-allow-zero-sagaw-if-second-stage-not-supp.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 408488caeddeea36173c286547cea86108a4dfd5
Author: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
Date:   Wed Mar 29 21:47:20 2023 +0800

    iommu/vt-d: Allow zero SAGAW if second-stage not supported
    
    [ Upstream commit bfd3c6b9fa4a1dc78139dd1621d5bea321ffa69d ]
    
    The VT-d spec states (in section 11.4.2) that hardware implementations
    reporting second-stage translation support (SSTS) field as Clear also
    report the SAGAW field as 0. Fix an inappropriate check in alloc_iommu().
    
    Fixes: 792fb43ce2c9 ("iommu/vt-d: Enable Intel IOMMU scalable mode by default")
    Suggested-by: Raghunathan Srinivasan <raghunathan.srinivasan@xxxxxxxxx>
    Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>
    Signed-off-by: Jacob Pan <jacob.jun.pan@xxxxxxxxxxxxxxx>
    Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230318024824.124542-1-baolu.lu@xxxxxxxxxxxxxxx
    Link: https://lore.kernel.org/r/20230329134721.469447-3-baolu.lu@xxxxxxxxxxxxxxx
    Signed-off-by: Joerg Roedel <jroedel@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c
index bc94059a5b870..f800989ea0462 100644
--- a/drivers/iommu/intel/dmar.c
+++ b/drivers/iommu/intel/dmar.c
@@ -1057,7 +1057,8 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd)
 	}
 
 	err = -EINVAL;
-	if (cap_sagaw(iommu->cap) == 0) {
+	if (!cap_sagaw(iommu->cap) &&
+	    (!ecap_smts(iommu->ecap) || ecap_slts(iommu->ecap))) {
 		pr_info("%s: No supported address widths. Not attempting DMA translation.\n",
 			iommu->name);
 		drhd->ignored = 1;



[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