]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/iommu/intel/iommu.c
Merge branch 'for-next/iommu/vt-d' into for-next/iommu/core
[mirror_ubuntu-jammy-kernel.git] / drivers / iommu / intel / iommu.c
index 770c53762b61011e1660907d7c79c1547909764a..07f8b012e1b6e1422e93c09a55198225978f053f 100644 (file)
@@ -2831,13 +2831,6 @@ static int device_def_domain_type(struct device *dev)
        if (dev_is_pci(dev)) {
                struct pci_dev *pdev = to_pci_dev(dev);
 
-               /*
-                * Prevent any device marked as untrusted from getting
-                * placed into the statically identity mapping domain.
-                */
-               if (pdev->untrusted)
-                       return IOMMU_DOMAIN_DMA;
-
                if ((iommu_identity_mapping & IDENTMAP_AZALIA) && IS_AZALIA(pdev))
                        return IOMMU_DOMAIN_IDENTITY;
 
@@ -4507,7 +4500,7 @@ static void auxiliary_unlink_device(struct dmar_domain *domain,
        domain->auxd_refcnt--;
 
        if (!domain->auxd_refcnt && domain->default_pasid > 0)
-               ioasid_free(domain->default_pasid);
+               ioasid_put(domain->default_pasid);
 }
 
 static int aux_domain_add_dev(struct dmar_domain *domain,
@@ -4568,7 +4561,7 @@ attach_failed:
        spin_unlock(&iommu->lock);
        spin_unlock_irqrestore(&device_domain_lock, flags);
        if (!domain->auxd_refcnt && domain->default_pasid > 0)
-               ioasid_free(domain->default_pasid);
+               ioasid_put(domain->default_pasid);
 
        return ret;
 }