Commit 323f99cb authored by Tom Lyon's avatar Tom Lyon Committed by Joerg Roedel

iommu-api: Extension to check for interrupt remapping

This patch allows IOMMU users to determine whether the
hardware and software support safe, isolated interrupt
remapping.  Not all Intel IOMMUs have the hardware, and the
software for AMD is not there yet.
Signed-off-by: default avatarTom Lyon <pugs@cisco.com>
Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent 1c5474a6
...@@ -3698,6 +3698,8 @@ static int intel_iommu_domain_has_cap(struct iommu_domain *domain, ...@@ -3698,6 +3698,8 @@ static int intel_iommu_domain_has_cap(struct iommu_domain *domain,
if (cap == IOMMU_CAP_CACHE_COHERENCY) if (cap == IOMMU_CAP_CACHE_COHERENCY)
return dmar_domain->iommu_snooping; return dmar_domain->iommu_snooping;
if (cap == IOMMU_CAP_INTR_REMAP)
return intr_remapping_enabled;
return 0; return 0;
} }
......
...@@ -30,6 +30,7 @@ struct iommu_domain { ...@@ -30,6 +30,7 @@ struct iommu_domain {
}; };
#define IOMMU_CAP_CACHE_COHERENCY 0x1 #define IOMMU_CAP_CACHE_COHERENCY 0x1
#define IOMMU_CAP_INTR_REMAP 0x2 /* isolates device intrs */
struct iommu_ops { struct iommu_ops {
int (*domain_init)(struct iommu_domain *domain); int (*domain_init)(struct iommu_domain *domain);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment