iommu/dma: Don't reserve PCI I/O windows
authorRobin Murphy <robin.murphy@arm.com>
Thu, 16 Mar 2017 17:00:17 +0000 (17:00 +0000)
committerJoerg Roedel <jroedel@suse.de>
Wed, 22 Mar 2017 15:18:59 +0000 (16:18 +0100)
Even if a host controller's CPU-side MMIO windows into PCI I/O space do
happen to leak into PCI memory space such that it might treat them as
peer addresses, trying to reserve the corresponding I/O space addresses
doesn't do anything to help solve that problem. Stop doing a silly thing.

Fixes: fade1ec055dc ("iommu/dma: Avoid PCI host bridge windows")
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/dma-iommu.c

index 48d36ce59efbfd6305f8e85e9ae85875f71215f8..1e0983488a8d79f0228345cf424176712ea53892 100644 (file)
@@ -175,8 +175,7 @@ static void iova_reserve_pci_windows(struct pci_dev *dev,
        unsigned long lo, hi;
 
        resource_list_for_each_entry(window, &bridge->windows) {
-               if (resource_type(window->res) != IORESOURCE_MEM &&
-                   resource_type(window->res) != IORESOURCE_IO)
+               if (resource_type(window->res) != IORESOURCE_MEM)
                        continue;
 
                lo = iova_pfn(iovad, window->res->start - window->offset);