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>
This commit is contained in:
parent
0bb6e243d7
commit
07f643a35d
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue