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

[xen master] xen/arm: add iounmap after initrd has been loaded in domain_build



commit e61a78981364925a43c9cc24dc77b62ff7b93c9f
Author:     Wei Chen <wei.chen@xxxxxxx>
AuthorDate: Fri Nov 4 18:07:32 2022 +0800
Commit:     Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Mon Nov 7 18:59:24 2022 +0000

    xen/arm: add iounmap after initrd has been loaded in domain_build
    
    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@xxxxxxx>
    Release-acked-by: Henry Wang <Henry.Wang@xxxxxxx>
    Acked-by: Julien Grall <jgrall@xxxxxxxxxx>
---
 xen/arch/arm/domain_build.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 4fb5c20b13..bd30d3798c 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -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);
 }
 
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.