]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
intel-iommu: Don't set identity mapping for bypassed graphics devices
authorDavid Woodhouse <David.Woodhouse@intel.com>
Sat, 4 Jul 2009 09:40:38 +0000 (10:40 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Sat, 4 Jul 2009 09:40:44 +0000 (10:40 +0100)
We should check iommu_dummy() _first_, because that means it's attached
to an iommu that we've just disabled completely. At the moment, we might
try to put the device into the identity mapping domain.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/pci/intel-iommu.c

index ad85e95d2dcc2f3e894dc6b5b6cdb717b2dc1385..3e3910127fc136e44f25d9db703c36b18a98c84a 100644 (file)
@@ -2447,8 +2447,11 @@ static int iommu_no_mapping(struct pci_dev *pdev)
 {
        int found;
 
+       if (iommu_dummy(pdev))
+               return 1;
+
        if (!iommu_identity_mapping)
-               return iommu_dummy(pdev);
+               return 0;
 
        found = identity_mapping(pdev);
        if (found) {
@@ -2480,7 +2483,7 @@ static int iommu_no_mapping(struct pci_dev *pdev)
                }
        }
 
-       return iommu_dummy(pdev);
+       return 0;
 }
 
 static dma_addr_t __intel_map_single(struct device *hwdev, phys_addr_t paddr,