From: Andrii Anisov Date: Wed, 23 Jan 2019 12:50:07 +0000 (+0200) Subject: arm/p2m: call iommu iotlb flush if iommu exists and enabled X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9ed527dc95dd8f1871fc5c9f6fa5a58fbd0379a1;p=people%2Fpauldu%2Fxen.git arm/p2m: call iommu iotlb flush if iommu exists and enabled Taking decision by `need_iommu_pt_sync()` make us never kicking `iommu_iotlb_flush()` for IOMMUs which do share P2M with CPU. So check `has_iommu_pt()` instead. Signed-off-by: Andrii Anisov Reviewed-by: Paul Durant Release-Acked-by: Juergen Gross Acked-by: Julien Grall --- diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 2394f97476..059a39157a 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -1019,7 +1019,7 @@ static int __p2m_set_entry(struct p2m_domain *p2m, !mfn_eq(lpae_get_mfn(*entry), lpae_get_mfn(orig_pte)) ) p2m_free_entry(p2m, orig_pte, level); - if ( need_iommu_pt_sync(p2m->domain) && + if ( has_iommu_pt(p2m->domain) && (lpae_is_valid(orig_pte) || lpae_is_valid(*entry)) ) { unsigned int flush_flags = 0;