Skip to content

Commit

Permalink
iommu/vt-d: Expose ISA direct mapping region via iommu_get_resv_regions
Browse files Browse the repository at this point in the history
To support mapping ISA region via iommu_group_create_direct_mappings,
make sure its exposed by iommu_get_resv_regions.

Signed-off-by: James Sewart <jamessewart@arista.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Lu Baolu authored and Joerg Roedel committed May 28, 2019
1 parent 73bcbdc commit d850c2e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -5479,6 +5479,19 @@ static void intel_iommu_get_resv_regions(struct device *device,
}
rcu_read_unlock();

#ifdef CONFIG_INTEL_IOMMU_FLOPPY_WA
if (dev_is_pci(device)) {
struct pci_dev *pdev = to_pci_dev(device);

if ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA) {
reg = iommu_alloc_resv_region(0, 1UL << 24, 0,
IOMMU_RESV_DIRECT);
if (reg)
list_add_tail(&reg->list, head);
}
}
#endif /* CONFIG_INTEL_IOMMU_FLOPPY_WA */

reg = iommu_alloc_resv_region(IOAPIC_RANGE_START,
IOAPIC_RANGE_END - IOAPIC_RANGE_START + 1,
0, IOMMU_RESV_MSI);
Expand Down

0 comments on commit d850c2e

Please sign in to comment.