iommu: Fix false ownership failure on AMD systems with PASID activated
[sfrench/cifs-2.6.git] / drivers / iommu / amd / iommu_v2.c
index 696d5555be5794bb0ef4329e3608753fee70385f..6a1f02c62dffccd32cdd435f96ba322a7da42a44 100644 (file)
@@ -777,6 +777,8 @@ int amd_iommu_init_device(struct pci_dev *pdev, int pasids)
        if (dev_state->domain == NULL)
                goto out_free_states;
 
+       /* See iommu_is_default_domain() */
+       dev_state->domain->type = IOMMU_DOMAIN_IDENTITY;
        amd_iommu_domain_direct_map(dev_state->domain);
 
        ret = amd_iommu_domain_enable_v2(dev_state->domain, pasids);