All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: arm: add missing flushing dcache to the copy to/clean guest functions
@ 2013-11-25 16:21 Oleksandr Dmytryshyn
  2013-11-25 16:33 ` Ian Campbell
  0 siblings, 1 reply; 7+ messages in thread
From: Oleksandr Dmytryshyn @ 2013-11-25 16:21 UTC (permalink / raw)
  To: xen-devel; +Cc: andrii.anisov

Without flushing dcache the hypervisor couldn't copy the device tree
correctly when booting the kernel dom0 Image (memory with device tree
is corrupted). As the result - when we try to load the kernel dom0
Image - dom0 hungs frequently. This issue is not reproduced with the
kernel dom0 zImage because the zImage decompressor code flushes all
dcache before starting the decompressed kernel Image. When the
hypervisor loads the kernel uImage or initrd, this memory region
isn't corrupted because the hypervisor code flushes the dcache.

Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>
---
 xen/arch/arm/guestcopy.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/guestcopy.c b/xen/arch/arm/guestcopy.c
index d146cd6..28d3151 100644
--- a/xen/arch/arm/guestcopy.c
+++ b/xen/arch/arm/guestcopy.c
@@ -24,6 +24,7 @@ unsigned long raw_copy_to_guest(void *to, const void *from, unsigned len)
         p = map_domain_page(g>>PAGE_SHIFT);
         p += offset;
         memcpy(p, from, size);
+        flush_xen_dcache_va_range(p, size);
 
         unmap_domain_page(p - offset);
         len -= size;
@@ -54,6 +55,7 @@ unsigned long raw_clear_guest(void *to, unsigned len)
         p = map_domain_page(g>>PAGE_SHIFT);
         p += offset;
         memset(p, 0x00, size);
+        flush_xen_dcache_va_range(p, size);
 
         unmap_domain_page(p - offset);
         len -= size;
-- 
1.8.2.rc2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-12-02 10:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-25 16:21 [PATCH] xen: arm: add missing flushing dcache to the copy to/clean guest functions Oleksandr Dmytryshyn
2013-11-25 16:33 ` Ian Campbell
2013-11-25 17:04   ` Oleksandr Dmytryshyn
2013-11-25 17:06   ` Julien Grall
2013-11-26  8:15     ` Oleksandr Dmytryshyn
2013-12-01 16:21       ` Stefano Stabellini
2013-12-02 10:10         ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.