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

[Xen-changelog] [xen-unstable] arm: implement flush_tlb_all_local and flush_tlb_local


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Sat, 02 Jun 2012 03:11:10 +0000
  • Delivery-date: Sat, 02 Jun 2012 03:11:20 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
# Date 1338542434 -3600
# Node ID ebf41e3d1ee3041a96d84e2a6f7576171179772b
# Parent  dde175688d5f0b53779fb96987138a477c62e887
arm: implement flush_tlb_all_local and flush_tlb_local

Call flush_tlb_all_local from create_p2m_entries after removing a page
from the p2m.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r dde175688d5f -r ebf41e3d1ee3 xen/arch/arm/p2m.c
--- a/xen/arch/arm/p2m.c        Fri Jun 01 10:20:33 2012 +0100
+++ b/xen/arch/arm/p2m.c        Fri Jun 01 10:20:34 2012 +0100
@@ -3,6 +3,7 @@
 #include <xen/lib.h>
 #include <xen/errno.h>
 #include <xen/domain_page.h>
+#include <asm/flushtlb.h>
 
 void p2m_load_VTTBR(struct domain *d)
 {
@@ -123,6 +124,7 @@ static int create_p2m_entries(struct dom
             /* p2m entry already present */
             free_domheap_page(
                     mfn_to_page(third[third_table_offset(addr)].p2m.base));
+            flush_tlb_all_local();
         }
 
         /* Allocate a new RAM page and attach */
diff -r dde175688d5f -r ebf41e3d1ee3 xen/include/asm-arm/flushtlb.h
--- a/xen/include/asm-arm/flushtlb.h    Fri Jun 01 10:20:33 2012 +0100
+++ b/xen/include/asm-arm/flushtlb.h    Fri Jun 01 10:20:34 2012 +0100
@@ -14,8 +14,27 @@ do {                                    
 
 #define tlbflush_current_time()                 (0)
 
-/* Flush local TLBs */
-void flush_tlb_local(void);
+/* Flush local TLBs, current VMID only */
+static inline void flush_tlb_local(void)
+{
+    dsb();
+
+    WRITE_CP32((uint32_t) 0, TLBIALLIS);
+
+    dsb();
+    isb();
+}
+
+/* Flush local TLBs, all VMIDs, non-hypervisor mode */
+static inline void flush_tlb_all_local(void)
+{
+    dsb();
+
+    WRITE_CP32((uint32_t) 0, TLBIALLNSNHIS);
+
+    dsb();
+    isb();
+}
 
 /* Flush specified CPUs' TLBs */
 void flush_tlb_mask(const cpumask_t *mask);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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