[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] AMD/IOMMU: drop stray TLB flush
commit c8a25eb617ee8554d7212bb1c8e64227cb5566af Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Apr 22 14:54:59 2022 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Apr 22 14:54:59 2022 +0200 AMD/IOMMU: drop stray TLB flush I think this flush was overlooked when flushing was moved out of the core (un)mapping functions. The flush the caller is required to invoke anyway will satisfy the needs resulting from the splitting of a superpage. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- xen/drivers/passthrough/amd/iommu_map.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xen/drivers/passthrough/amd/iommu_map.c b/xen/drivers/passthrough/amd/iommu_map.c index 8bef46e045..3abcac247e 100644 --- a/xen/drivers/passthrough/amd/iommu_map.c +++ b/xen/drivers/passthrough/amd/iommu_map.c @@ -240,7 +240,7 @@ void __init iommu_dte_add_device_entry(struct amd_iommu_dte *dte, */ static int iommu_pde_from_dfn(struct domain *d, unsigned long dfn, unsigned int target, unsigned long *pt_mfn, - bool map) + unsigned int *flush_flags, bool map) { union amd_iommu_pte *pde, *next_table_vaddr; unsigned long next_table_mfn; @@ -301,7 +301,7 @@ static int iommu_pde_from_dfn(struct domain *d, unsigned long dfn, set_iommu_pde_present(pde, next_table_mfn, next_level, true, true); - amd_iommu_flush_all_pages(d); + *flush_flags |= IOMMU_FLUSHF_modified; } /* Install lower level page table for non-present entries */ @@ -374,7 +374,8 @@ int cf_check amd_iommu_map_page( return rc; } - if ( iommu_pde_from_dfn(d, dfn_x(dfn), 1, &pt_mfn, true) || !pt_mfn ) + if ( iommu_pde_from_dfn(d, dfn_x(dfn), 1, &pt_mfn, flush_flags, true) || + !pt_mfn ) { spin_unlock(&hd->arch.mapping_lock); AMD_IOMMU_ERROR("invalid IO pagetable entry dfn = %"PRI_dfn"\n", @@ -407,7 +408,7 @@ int cf_check amd_iommu_unmap_page( return 0; } - if ( iommu_pde_from_dfn(d, dfn_x(dfn), 1, &pt_mfn, false) ) + if ( iommu_pde_from_dfn(d, dfn_x(dfn), 1, &pt_mfn, flush_flags, false) ) { spin_unlock(&hd->arch.mapping_lock); AMD_IOMMU_ERROR("invalid IO pagetable entry dfn = %"PRI_dfn"\n", -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |