diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-07-04 10:40:38 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-07-04 10:40:44 +0100 |
commit | 1e4c64c46d413de84cc0b786bd6a9b555ba7d111 (patch) | |
tree | 5f7c9aa7801c59f88dacdcae3c6722c5d9149ebf | |
parent | 5a5e02a614e59db7536cd11029e6674adc41b191 (diff) | |
download | kernel-crypto-1e4c64c46d413de84cc0b786bd6a9b555ba7d111.tar.gz kernel-crypto-1e4c64c46d413de84cc0b786bd6a9b555ba7d111.tar.xz kernel-crypto-1e4c64c46d413de84cc0b786bd6a9b555ba7d111.zip |
intel-iommu: Don't set identity mapping for bypassed graphics devices
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>
-rw-r--r-- | drivers/pci/intel-iommu.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index ad85e95d2dc..3e3910127fc 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -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, |