lkml.org 
[lkml]   [2020]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 043/111] iommu/amd: Call domain_flush_complete() in update_domain()
    Date
    From: Joerg Roedel <jroedel@suse.de>

    [ Upstream commit f44a4d7e4f1cdef73c90b1dc749c4d8a7372a8eb ]

    The update_domain() function is expected to also inform the hardware
    about domain changes. This needs a COMPLETION_WAIT command to be sent
    to all IOMMUs which use the domain.

    Signed-off-by: Joerg Roedel <jroedel@suse.de>
    Tested-by: Qian Cai <cai@lca.pw>
    Link: https://lore.kernel.org/r/20200504125413.16798-4-joro@8bytes.org
    Signed-off-by: Joerg Roedel <jroedel@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/iommu/amd_iommu.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
    index bc7771498342..32de8e7bb8b4 100644
    --- a/drivers/iommu/amd_iommu.c
    +++ b/drivers/iommu/amd_iommu.c
    @@ -2386,6 +2386,7 @@ static void update_domain(struct protection_domain *domain)

    domain_flush_devices(domain);
    domain_flush_tlb_pde(domain);
    + domain_flush_complete(domain);
    }

    static int dir2prot(enum dma_data_direction direction)
    --
    2.25.1


    \
     
     \ /
      Last update: 2020-05-26 21:25    [W:4.026 / U:0.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site