iommu-api: Extension to check for interrupt remapping
authorTom Lyon <pugs@cisco.com>
Fri, 2 Jul 2010 20:56:14 +0000 (16:56 -0400)
committerJoerg Roedel <joerg.roedel@amd.com>
Mon, 19 Jul 2010 13:44:25 +0000 (15:44 +0200)
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>
drivers/pci/intel-iommu.c
include/linux/iommu.h

index c9171be74564b684ba41108fd15a566187910023..6a5af18faf684e2ab6cecd1a9b9e9d8ad7e321b1 100644 (file)
@@ -3698,6 +3698,8 @@ static int intel_iommu_domain_has_cap(struct iommu_domain *domain,
 
        if (cap == IOMMU_CAP_CACHE_COHERENCY)
                return dmar_domain->iommu_snooping;
+       if (cap == IOMMU_CAP_INTR_REMAP)
+               return intr_remapping_enabled;
 
        return 0;
 }
index be22ad83689cb96275d0386c5325c4079699dc9c..0a2ba4098996de9ef07ed8cdf11bd11b90901548 100644 (file)
@@ -30,6 +30,7 @@ struct iommu_domain {
 };
 
 #define IOMMU_CAP_CACHE_COHERENCY      0x1
+#define IOMMU_CAP_INTR_REMAP           0x2     /* isolates device intrs */
 
 struct iommu_ops {
        int (*domain_init)(struct iommu_domain *domain);