]> xenbits.xensource.com Git - people/sstabellini/linux-pvhvm-deprecated.git/commitdiff
HACK! call flush_cache_all() after updating translation table entries
authorDavid Vrabel <david.vrabel@citrix.com>
Thu, 22 Dec 2011 15:32:56 +0000 (15:32 +0000)
committerDavid Vrabel <david.vrabel@citrix.com>
Mon, 9 Jan 2012 14:22:12 +0000 (14:22 +0000)
Updates to translation tables aren't working right when running as a
Xen guest unless the cache is flushed.  This is very much a big hammer
to crack a small nut.

arch/arm/include/asm/cacheflush.h
arch/arm/mm/fault.c

index d5d8d5c72682501a54509e9758f90aa31ff127a8..8a326bb56b60c851c2233684dab81e4b9bd879d6 100644 (file)
@@ -336,6 +336,11 @@ static inline void flush_cache_vmap(unsigned long start, unsigned long end)
                 * have a DSB after cleaning the cache line.
                 */
                dsb();
+       /*
+        * FIXME: translation table updates not working right unless
+        * this flush is here.
+        */
+       flush_cache_all();
 }
 
 static inline void flush_cache_vunmap(unsigned long start, unsigned long end)
index aa33949fef608cb4c5b7b9a76e0f4020ba0f1db6..f9f9f86191c82dd253dfb3821fa6a2cb8f93fb62 100644 (file)
@@ -258,6 +258,14 @@ good_area:
         * sure we exit gracefully rather than endlessly redo the fault.
         */
        fault = handle_mm_fault(mm, vma, addr & PAGE_MASK, (fsr & FSR_WRITE) ? FAULT_FLAG_WRITE : 0);
+
+       /*
+        * FIXME: handle_mm_fault() probably updated some translation
+        * table entries and these are not working right unless this
+        * flush is here.
+        */
+       flush_cache_all();
+
        if (unlikely(fault & VM_FAULT_ERROR))
                return fault;
        if (fault & VM_FAULT_MAJOR)