[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xen/arm: create_p2m_entries has to flush TLBs on every CPU



The function create_p2m_entries creates mappings in second-level page tables
which is shared between every CPU.

Only flushing TLBs on local processor may result to wrong behaviour
when io{re,un}map is used.

Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
---

This patch is candidate to be backported to Xen 4.4.

create_p2m_entries is only used by vmap ( iore{,un}map functions.

Upstream Xen 4.4 calls these functions only when 1 CPU is online so it's
"safe". People might want to use them when multiple CPUs are online.

Ian: Do you plan to backport your tlb series? If not, this patch will have
to slighty change because Xen 4.4 doesn't have TLBs helper to flush xen
data on every cpus.
---
 xen/arch/arm/mm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 362bc8d..eac228c 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -845,7 +845,7 @@ static int create_xen_entries(enum xenmap_operation op,
                 BUG();
         }
     }
-    flush_xen_data_tlb_range_va_local(virt, PAGE_SIZE * nr_mfns);
+    flush_xen_data_tlb_range_va(virt, PAGE_SIZE * nr_mfns);
 
     rc = 0;
 
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.