diff options
author | Tom Lyon <pugs@cisco.com> | 2010-07-02 16:56:14 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2010-07-19 09:44:25 -0400 |
commit | 323f99cbc35c52a65dea9d072b3ecf1e662240d2 (patch) | |
tree | db4420fb391465df818949a2190e8acd8637164f | |
parent | 1c5474a65bf15a4cb162dfff86d6d0b5a08a740c (diff) |
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: Tom Lyon <pugs@cisco.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
-rw-r--r-- | drivers/pci/intel-iommu.c | 2 | ||||
-rw-r--r-- | include/linux/iommu.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index c9171be74564..6a5af18faf68 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -3698,6 +3698,8 @@ static int intel_iommu_domain_has_cap(struct iommu_domain *domain, | |||
3698 | 3698 | ||
3699 | if (cap == IOMMU_CAP_CACHE_COHERENCY) | 3699 | if (cap == IOMMU_CAP_CACHE_COHERENCY) |
3700 | return dmar_domain->iommu_snooping; | 3700 | return dmar_domain->iommu_snooping; |
3701 | if (cap == IOMMU_CAP_INTR_REMAP) | ||
3702 | return intr_remapping_enabled; | ||
3701 | 3703 | ||
3702 | return 0; | 3704 | return 0; |
3703 | } | 3705 | } |
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index be22ad83689c..0a2ba4098996 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
@@ -30,6 +30,7 @@ struct iommu_domain { | |||
30 | }; | 30 | }; |
31 | 31 | ||
32 | #define IOMMU_CAP_CACHE_COHERENCY 0x1 | 32 | #define IOMMU_CAP_CACHE_COHERENCY 0x1 |
33 | #define IOMMU_CAP_INTR_REMAP 0x2 /* isolates device intrs */ | ||
33 | 34 | ||
34 | struct iommu_ops { | 35 | struct iommu_ops { |
35 | int (*domain_init)(struct iommu_domain *domain); | 36 | int (*domain_init)(struct iommu_domain *domain); |