From: Ian Campbell Subject: [PATCH 08/10] xen/arm: flush dcache after memcpy'ing the kernel image Date: Fri, 18 Jan 2013 16:40:34 +0000 Message-ID: <1358527236-2486-8-git-send-email-ian.campbell@citrix.com> References: <1358526135.3279.103.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1358526135.3279.103.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: tim@xen.org, stefano.stabellini@citrix.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org From: Stefano Stabellini 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 Acked-by: Ian Campbell --- xen/arch/arm/kernel.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c index c9265d7..2f7a9ff 100644 --- a/xen/arch/arm/kernel.c +++ b/xen/arch/arm/kernel.c @@ -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; -- 1.7.9.1