lkml.org 
[lkml]   [2021]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 20/33] iommu/mediatek: Allow IOMMU_DOMAIN_UNMANAGED for PCIe VFIO
    Date
    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>
    ---
    drivers/iommu/mtk_iommu.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
    index 2818b984c905..d103e4f33078 100644
    --- a/drivers/iommu/mtk_iommu.c
    +++ b/drivers/iommu/mtk_iommu.c
    @@ -450,7 +450,7 @@ static struct iommu_domain *mtk_iommu_domain_alloc(unsigned type)
    {
    struct mtk_iommu_domain *dom;

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

    dom = kzalloc(sizeof(*dom), GFP_KERNEL);
    --
    2.18.0
    \
     
     \ /
      Last update: 2021-09-23 14:03    [W:4.218 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site