提交 07f643a3 编写于 作者: J Joerg Roedel

iommu/amd: Support IOMMU_DOMAIN_IDENTITY type allocation

Add support to allocate direct mapped domains through the
IOMMU-API.
Signed-off-by: NJoerg Roedel <jroedel@suse.de>
上级 0bb6e243
...@@ -2996,6 +2996,13 @@ static struct iommu_domain *amd_iommu_domain_alloc(unsigned type) ...@@ -2996,6 +2996,13 @@ static struct iommu_domain *amd_iommu_domain_alloc(unsigned type)
} }
pdomain = &dma_domain->domain; pdomain = &dma_domain->domain;
break; break;
case IOMMU_DOMAIN_IDENTITY:
pdomain = protection_domain_alloc();
if (!pdomain)
return NULL;
pdomain->mode = PAGE_MODE_NONE;
break;
default: default:
return NULL; return NULL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册