summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/amd_iommu.c
diff options
context:
space:
mode:
authorSheng Yang <sheng@linux.intel.com>2009-03-18 15:33:06 +0800
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-03-24 09:42:51 +0000
commitdbb9fd8630e95b6155aff658a2b5f80e95ca2bc6 (patch)
treeb24caff50e1c5bfb428cb7422608bfef95d916e8 /arch/x86/kernel/amd_iommu.c
parent58c610bd1a3f50820e45a7c09ec0e44d2cda15dd (diff)
downloadlwn-dbb9fd8630e95b6155aff658a2b5f80e95ca2bc6.tar.gz
lwn-dbb9fd8630e95b6155aff658a2b5f80e95ca2bc6.zip
iommu: Add domain_has_cap iommu_ops
This iommu_op can tell if domain have a specific capability, like snooping control for Intel IOMMU, which can be used by other components of kernel to adjust the behaviour. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'arch/x86/kernel/amd_iommu.c')
-rw-r--r--arch/x86/kernel/amd_iommu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 5113c080f0c4..65c9b58655ff 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -1924,6 +1924,12 @@ static phys_addr_t amd_iommu_iova_to_phys(struct iommu_domain *dom,
return paddr;
}
+static int amd_iommu_domain_has_cap(struct iommu_domain *domain,
+ unsigned long cap)
+{
+ return 0;
+}
+
static struct iommu_ops amd_iommu_ops = {
.domain_init = amd_iommu_domain_init,
.domain_destroy = amd_iommu_domain_destroy,
@@ -1932,5 +1938,6 @@ static struct iommu_ops amd_iommu_ops = {
.map = amd_iommu_map_range,
.unmap = amd_iommu_unmap_range,
.iova_to_phys = amd_iommu_iova_to_phys,
+ .domain_has_cap = amd_iommu_domain_has_cap,
};