]> xenbits.xensource.com Git - people/pauldu/xen.git/commitdiff
arm/p2m: call iommu iotlb flush if iommu exists and enabled
authorAndrii Anisov <andrii_anisov@epam.com>
Wed, 23 Jan 2019 12:50:07 +0000 (14:50 +0200)
committerJulien Grall <julien.grall@arm.com>
Wed, 23 Jan 2019 13:35:51 +0000 (13:35 +0000)
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 <andrii_anisov@epam.com>
Reviewed-by: Paul Durant <paul.durrant@citrix.com>
Release-Acked-by: Juergen Gross <jgross@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/p2m.c

index 2394f974768148fe60a9ff6718db86b83cfb134b..059a39157a39f109c57aa731f6e752c27b02a62b 100644 (file)
@@ -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;