Patch "iommu/vt-d: Make context clearing consistent with context mapping" has been added to the 6.6-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: Make context clearing consistent with context mapping

to the 6.6-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-make-context-clearing-consistent-with-con.patch
and it can be found in the queue-6.6 subdirectory.

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



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

    iommu/vt-d: Make context clearing consistent with context mapping
    
    [ Upstream commit 9a16ab9d640274b20813d2d17475e18d3e99d834 ]
    
    In the iommu probe_device path, domain_context_mapping() allows setting
    up the context entry for a non-PCI device. However, in the iommu
    release_device path, domain_context_clear() only clears context entries
    for PCI devices.
    
    Make domain_context_clear() behave consistently with
    domain_context_mapping() by clearing context entries for both PCI and
    non-PCI devices.
    
    Fixes: 579305f75d34 ("iommu/vt-d: Update to use PCI DMA aliases")
    Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
    Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20231114011036.70142-4-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 18fa71aadc903..4c3707384bd92 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -3923,8 +3923,8 @@ static int domain_context_clear_one_cb(struct pci_dev *pdev, u16 alias, void *op
  */
 static void domain_context_clear(struct device_domain_info *info)
 {
-	if (!info->iommu || !info->dev || !dev_is_pci(info->dev))
-		return;
+	if (!dev_is_pci(info->dev))
+		domain_context_clear_one(info, info->bus, info->devfn);
 
 	pci_for_each_dma_alias(to_pci_dev(info->dev),
 			       &domain_context_clear_one_cb, info);



[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