Skip to content

Commit d850c2e

Browse files
LuBaolujoergroedel
authored andcommitted
iommu/vt-d: Expose ISA direct mapping region via iommu_get_resv_regions
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 <[email protected]> Signed-off-by: Lu Baolu <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent 73bcbdc commit d850c2e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/iommu/intel-iommu.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5479,6 +5479,19 @@ static void intel_iommu_get_resv_regions(struct device *device,
54795479
}
54805480
rcu_read_unlock();
54815481

5482+
#ifdef CONFIG_INTEL_IOMMU_FLOPPY_WA
5483+
if (dev_is_pci(device)) {
5484+
struct pci_dev *pdev = to_pci_dev(device);
5485+
5486+
if ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA) {
5487+
reg = iommu_alloc_resv_region(0, 1UL << 24, 0,
5488+
IOMMU_RESV_DIRECT);
5489+
if (reg)
5490+
list_add_tail(&reg->list, head);
5491+
}
5492+
}
5493+
#endif /* CONFIG_INTEL_IOMMU_FLOPPY_WA */
5494+
54825495
reg = iommu_alloc_resv_region(IOAPIC_RANGE_START,
54835496
IOAPIC_RANGE_END - IOAPIC_RANGE_START + 1,
54845497
0, IOMMU_RESV_MSI);

0 commit comments

Comments
 (0)