Skip to content

Commit

Permalink
intel-iommu: Don't set identity mapping for bypassed graphics devices
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Jul 4, 2009
1 parent 5a5e02a commit 1e4c64c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 1e4c64c

Please sign in to comment.