Skip to content

Commit d67735f

Browse files
author
CKI KWF Bot
committed
Merge: [RHEL-9.6] iommu/vt-d: a couple of late fixes
MR: https://gitlab.com/redhat/rhel/src/kernel/rhel-9/-/merge_requests/3471 JIRA: https://issues.redhat.com/browse/RHEL-70102 Upstream-Status: git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux.git fixes branch ## Summary of Changes This pulls in a couple late landing vt-d fixes. One to fix an issue that came in with the global static identity domain support from v6.12 which was no longer creating context entries for aliases, and another fixing up a suspicious RCU usage warning in the code to allocate dmar fault interrupts locally. Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com> Closes RHEL-70102 Approved-by: Donald Dutile <ddutile@redhat.com> Approved-by: Eder Zulian <ezulian@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>
2 parents 8df7ab1 + a2d7d8a commit d67735f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

drivers/iommu/intel/dmar.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,6 +2056,7 @@ int enable_drhd_fault_handling(unsigned int cpu)
20562056
/*
20572057
* Enable fault control interrupt.
20582058
*/
2059+
guard(rwsem_read)(&dmar_global_lock);
20592060
for_each_iommu(iommu, drhd) {
20602061
u32 fault_status;
20612062
int ret;

drivers/iommu/intel/iommu.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3307,7 +3307,14 @@ int __init intel_iommu_init(void)
33073307
iommu_device_sysfs_add(&iommu->iommu, NULL,
33083308
intel_iommu_groups,
33093309
"%s", iommu->name);
3310+
/*
3311+
* The iommu device probe is protected by the iommu_probe_device_lock.
3312+
* Release the dmar_global_lock before entering the device probe path
3313+
* to avoid unnecessary lock order splat.
3314+
*/
3315+
up_read(&dmar_global_lock);
33103316
iommu_device_register(&iommu->iommu, &intel_iommu_ops, NULL);
3317+
down_read(&dmar_global_lock);
33113318

33123319
iommu_pmu_register(iommu);
33133320
}
@@ -4547,9 +4554,6 @@ static int context_setup_pass_through_cb(struct pci_dev *pdev, u16 alias, void *
45474554
{
45484555
struct device *dev = data;
45494556

4550-
if (dev != &pdev->dev)
4551-
return 0;
4552-
45534557
return context_setup_pass_through(dev, PCI_BUS_NUM(alias), alias & 0xff);
45544558
}
45554559

0 commit comments

Comments
 (0)