xen/arm: Panic if we can't copy the DTB to dom0 memory

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Julien Grall authored and Ian Campbell committed 2013-09-09 14:45:50 +01:00
1 parent 8529ac933e
commit ffcbfb66ee
1 file changed
+4 -1
+4 -1
View File
@@ -535,11 +535,14 @@ static int prepare_dtb(struct domain *d, struct kernel_info *kinfo)
static void dtb_load(struct kernel_info *kinfo)
{
void * __user dtb_virt = (void * __user)(register_t)kinfo->dtb_paddr;
unsigned long rc;
printk("Loading dom0 DTB to 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
kinfo->dtb_paddr, kinfo->dtb_paddr + fdt_totalsize(kinfo->fdt));
raw_copy_to_guest(dtb_virt, kinfo->fdt, fdt_totalsize(kinfo->fdt));
rc = raw_copy_to_guest(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);
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.