Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07f643a3 authored by Joerg Roedel's avatar Joerg Roedel
Browse files

iommu/amd: Support IOMMU_DOMAIN_IDENTITY type allocation



Add support to allocate direct mapped domains through the
IOMMU-API.

Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 0bb6e243
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2996,6 +2996,13 @@ static struct iommu_domain *amd_iommu_domain_alloc(unsigned type)
		}
		pdomain = &dma_domain->domain;
		break;
	case IOMMU_DOMAIN_IDENTITY:
		pdomain = protection_domain_alloc();
		if (!pdomain)
			return NULL;

		pdomain->mode = PAGE_MODE_NONE;
		break;
	default:
		return NULL;
	}