Skip to content

Commit 0cc6a43

Browse files
committed
iommu/vt-d: Make context clearing consistent with context mapping
jira LE-1907 Rebuild_History Non-Buildable kernel-5.14.0-427.18.1.el9_4 commit-author Lu Baolu <baolu.lu@linux.intel.com> commit 9a16ab9 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: 579305f ("iommu/vt-d: Update to use PCI DMA aliases") Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Link: https://lore.kernel.org/r/20231114011036.70142-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de> (cherry picked from commit 9a16ab9) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 88530f0 commit 0cc6a43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iommu/intel/iommu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3923,8 +3923,8 @@ static int domain_context_clear_one_cb(struct pci_dev *pdev, u16 alias, void *op
39233923
*/
39243924
static void domain_context_clear(struct device_domain_info *info)
39253925
{
3926-
if (!info->iommu || !info->dev || !dev_is_pci(info->dev))
3927-
return;
3926+
if (!dev_is_pci(info->dev))
3927+
domain_context_clear_one(info, info->bus, info->devfn);
39283928

39293929
pci_for_each_dma_alias(to_pci_dev(info->dev),
39303930
&domain_context_clear_one_cb, info);

0 commit comments

Comments
 (0)