aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/amd_iommu.c
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2015-05-28 12:41:41 -0400
committerJoerg Roedel <jroedel@suse.de>2015-06-11 03:42:22 -0400
commit07f643a35d6b50f0f091444f07db1353188e787e (patch)
tree8952a6c392919fecdd5c407c734915d14c0b9d3e /drivers/iommu/amd_iommu.c
parent0bb6e243d7fbb39fced5bd4a4c83eb49c6e820ce (diff)
iommu/amd: Support IOMMU_DOMAIN_IDENTITY type allocation
Add support to allocate direct mapped domains through the IOMMU-API. Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd_iommu.c')
-rw-r--r--drivers/iommu/amd_iommu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 27300aece203..188b81d56ac4 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -2996,6 +2996,13 @@ static struct iommu_domain *amd_iommu_domain_alloc(unsigned type)
2996 } 2996 }
2997 pdomain = &dma_domain->domain; 2997 pdomain = &dma_domain->domain;
2998 break; 2998 break;
2999 case IOMMU_DOMAIN_IDENTITY:
3000 pdomain = protection_domain_alloc();
3001 if (!pdomain)
3002 return NULL;
3003
3004 pdomain->mode = PAGE_MODE_NONE;
3005 break;
2999 default: 3006 default:
3000 return NULL; 3007 return NULL;
3001 } 3008 }