]> xenbits.xensource.com Git - people/aperard/xen-arm.git/commitdiff
xen/arm: flush dcache after memcpy'ing the kernel image
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Mon, 21 Jan 2013 12:40:31 +0000 (12:40 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Mon, 21 Jan 2013 12:40:31 +0000 (12:40 +0000)
After memcpy'ing the kernel in guest memory we need to flush the dcache
to make sure that the data actually reaches the memory before we start
executing guest code with caches disabled.

copy_from_paddr is the function that does the copy, so add a
flush_xen_dcache_va_range there.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/kernel.c

index c9265d721201947daf0a731307f0d663230ad064..2f7a9ff2a5fbc95eaa276c9d2e09541ff3329535 100644 (file)
@@ -54,6 +54,7 @@ void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len, int attrindx)
 
         set_fixmap(FIXMAP_MISC, p, attrindx);
         memcpy(dst, src + s, l);
+        flush_xen_dcache_va_range(dst, l);
 
         paddr += l;
         dst += l;