summaryrefslogtreecommitdiff
path: root/drivers/iommu/amd/init.c
diff options
context:
space:
mode:
authorSairaj Kodilkar <sarunkod@amd.com>2025-03-17 11:20:20 +0530
committerJoerg Roedel <jroedel@suse.de>2025-05-02 08:38:09 +0200
commit94a9921e2c25eedcf95b00cedbd065579406655a (patch)
treeeb0cbf36fbe367c8557f388ea5bffecd0d23e8f0 /drivers/iommu/amd/init.c
parent94c721ea03c7078163f41dbaa101ac721ddac329 (diff)
iommu/amd: Add support for HTRangeIgnore feature
AMD IOMMU reserves the address range 0xfd00000000-0xffffffffff for the hypertransport protocol (HT) and has special meaning. Hence devices cannot use this address range for the DMA. However on some AMD platforms this HT range is shifted to the very top of the address space and new feature bit `HTRangeIgnore` is introduced. When this feature bit is on, IOMMU treats the GPA access to the legacy HT range as regular GPA access. Signed-off-by: Sairaj Kodilkar <sarunkod@amd.com> Reviewed-by: Vasant Hegde <vasant.hegde@amd.com> Link: https://lore.kernel.org/r/20250317055020.25214-1-sarunkod@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd/init.c')
-rw-r--r--drivers/iommu/amd/init.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index dd9e26b7b718..acf8941e1ed3 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -256,6 +256,11 @@ int amd_iommu_get_num_iommus(void)
return amd_iommus_present;
}
+bool amd_iommu_ht_range_ignore(void)
+{
+ return check_feature2(FEATURE_HT_RANGE_IGNORE);
+}
+
/*
* Iterate through all the IOMMUs to get common EFR
* masks among all IOMMUs and warn if found inconsistency.