Commit 3d7dc865 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'iommu-fixes-v6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux

Pull iommu fixes from Joerg Roedel:

 - Intel VT-d fixes:
     - Fix suspicious RCU usage splat
     - Fix passthrough for devices under PCIe-PCI bridge

 - AMD-Vi fix:
     - Fix to preserve bits when updating device table entries

* tag 'iommu-fixes-v6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux:
  iommu/vt-d: Fix suspicious RCU usage
  iommu/vt-d: Remove device comparison in context_setup_pass_through_cb
  iommu/amd: Preserve default DTE fields when updating Host Page Table Root
parents 276f98ef b150654f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2043,12 +2043,12 @@ static void set_dte_entry(struct amd_iommu *iommu,
	make_clear_dte(dev_data, dte, &new);

	if (domain->iop.mode != PAGE_MODE_NONE)
		new.data[0] = iommu_virt_to_phys(domain->iop.root);
		new.data[0] |= iommu_virt_to_phys(domain->iop.root);

	new.data[0] |= (domain->iop.mode & DEV_ENTRY_MODE_MASK)
		    << DEV_ENTRY_MODE_SHIFT;

	new.data[0] |= DTE_FLAG_IR | DTE_FLAG_IW | DTE_FLAG_V;
	new.data[0] |= DTE_FLAG_IR | DTE_FLAG_IW;

	/*
	 * When SNP is enabled, we can only support TV=1 with non-zero domain ID.
+1 −0
Original line number Diff line number Diff line
@@ -2043,6 +2043,7 @@ int enable_drhd_fault_handling(unsigned int cpu)
	/*
	 * Enable fault control interrupt.
	 */
	guard(rwsem_read)(&dmar_global_lock);
	for_each_iommu(iommu, drhd) {
		u32 fault_status;
		int ret;
+7 −3
Original line number Diff line number Diff line
@@ -3146,7 +3146,14 @@ int __init intel_iommu_init(void)
		iommu_device_sysfs_add(&iommu->iommu, NULL,
				       intel_iommu_groups,
				       "%s", iommu->name);
		/*
		 * The iommu device probe is protected by the iommu_probe_device_lock.
		 * Release the dmar_global_lock before entering the device probe path
		 * to avoid unnecessary lock order splat.
		 */
		up_read(&dmar_global_lock);
		iommu_device_register(&iommu->iommu, &intel_iommu_ops, NULL);
		down_read(&dmar_global_lock);

		iommu_pmu_register(iommu);
	}
@@ -4378,9 +4385,6 @@ static int context_setup_pass_through_cb(struct pci_dev *pdev, u16 alias, void *
{
	struct device *dev = data;

	if (dev != &pdev->dev)
		return 0;

	return context_setup_pass_through(dev, PCI_BUS_NUM(alias), alias & 0xff);
}