Skip to content

Commit 32e1ccc

Browse files
YongWu-HFjoergroedel
authored andcommitted
iommu/mediatek: Allow IOMMU_DOMAIN_UNMANAGED for PCIe VFIO
Allow the type IOMMU_DOMAIN_UNMANAGED since vfio_iommu_type1.c always call iommu_domain_alloc. The PCIe EP works ok when going through vfio. Signed-off-by: Yong Wu <yong.wu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Link: https://lore.kernel.org/r/20220503071427.2285-20-yong.wu@mediatek.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent f7b71d0 commit 32e1ccc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/iommu/mtk_iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ static struct iommu_domain *mtk_iommu_domain_alloc(unsigned type)
446446
{
447447
struct mtk_iommu_domain *dom;
448448

449-
if (type != IOMMU_DOMAIN_DMA)
449+
if (type != IOMMU_DOMAIN_DMA && type != IOMMU_DOMAIN_UNMANAGED)
450450
return NULL;
451451

452452
dom = kzalloc(sizeof(*dom), GFP_KERNEL);

0 commit comments

Comments
 (0)