ACPI/IORT: Add msi address regions reservation helper

On some platforms msi parent address regions have to be excluded from
normal IOVA allocation in that they are detected and decoded in a HW
specific way by system components and so they cannot be considered normal
IOVA address space.

Add a helper function that retrieves ITS address regions - the msi
parent - through IORT device <-> ITS mappings and reserves it so that
these regions will not be translated by IOMMU and will be excluded from
IOVA allocations. The function checks for the smmu model number and
only applies the msi reservation if the platform requires it.

Signed-off-by: Shameer Kolothum <[email protected]>
Reviewed-by: Lorenzo Pieralisi <[email protected]>
[For the ITS part]
Reviewed-by: Marc Zyngier <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
This commit is contained in:
Shameer Kolothum 2018-02-13 15:20:50 +00:00 • committed by Joerg Roedel
commit 8b4282e6b8
3 changed files with 116 additions and 5 deletions

View file

@ -3450,7 +3450,8 @@ static int __init gic_acpi_parse_madt_its(struct acpi_subtable_header *header,
return -ENOMEM;
}
err = iort_register_domain_token(its_entry->translation_id, dom_handle);
err = iort_register_domain_token(its_entry->translation_id, res.start,
dom_handle);
if (err) {
pr_err("ITS@%pa: Unable to register GICv3 ITS domain token (ITS ID %d) to IORT\n",
&res.start, its_entry->translation_id);