]> xenbits.xensource.com Git - people/tklengyel/xen.git/commitdiff
xen/arm: add iounmap after initrd has been loaded in domain_build
authorWei Chen <wei.chen@arm.com>
Fri, 4 Nov 2022 10:07:32 +0000 (18:07 +0800)
committerJulien Grall <jgrall@amazon.com>
Mon, 7 Nov 2022 18:59:24 +0000 (18:59 +0000)
domain_build use ioremap_wc to map a new non-cacheable virtual
address for initrd. After Xen copy initrd from this address to
guest, this new allocated virtual address has not been unmapped.

So in this patch, we add an iounmap to the end of domain_build,
after Xen loaded initrd to guest memory.

Signed-off-by: Wei Chen <wei.chen@arm.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/arch/arm/domain_build.c

index 4fb5c20b132dfc53b83021679dc3b9154b7a876a..bd30d3798c9adf6328ec6e1d9f6eadfbb5085a78 100644 (file)
@@ -3418,6 +3418,8 @@ static void __init initrd_load(struct kernel_info *kinfo)
                                           initrd, len);
     if ( res != 0 )
         panic("Unable to copy the initrd in the hwdom memory\n");
+
+    iounmap(initrd);
 }
 
 /*