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

[Xen-changelog] [xen master] xen: arm: flush dcache while preparing the device tree for Dom0



commit c8f14de363587a0143e5d4181cca44979f4baa98
Author:     Oleksandr Dmytryshyn <oleksandr.dmytryshyn@xxxxxxxxxxxxxxx>
AuthorDate: Wed Nov 27 19:09:52 2013 +0200
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Fri Nov 29 10:29:04 2013 +0000

    xen: arm: flush dcache while preparing the device tree for Dom0
    
    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 image or initrd, this memory region
    isn't corrupted because the hypervisor code flushes the dcache.
    
    Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@xxxxxxxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Acked-by: Julien Grall<julien.grall@xxxxxxxxxx>
---
 xen/arch/arm/domain_build.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index e9bb01f..99e785a 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -906,7 +906,8 @@ static void dtb_load(struct kernel_info *kinfo)
     printk("Loading dom0 DTB to 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
            kinfo->dtb_paddr, kinfo->dtb_paddr + fdt_totalsize(kinfo->fdt));
 
-    rc = raw_copy_to_guest(dtb_virt, kinfo->fdt, fdt_totalsize(kinfo->fdt));
+    rc = raw_copy_to_guest_flush_dcache(dtb_virt, kinfo->fdt,
+                                        fdt_totalsize(kinfo->fdt));
     if ( rc != 0 )
         panic("Unable to copy the DTB to dom0 memory (rc = %lu)\n", rc);
     xfree(kinfo->fdt);
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
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®.