[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/boot: Explain how moving mod[0] works
commit 49c810e86799211bf15e67ddff8dca4e29166ca2 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Tue Apr 23 16:45:36 2024 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Thu May 9 18:19:49 2024 +0100 x86/boot: Explain how moving mod[0] works modules_headroom is a misleading name as it applies strictly to mod[0] only, and the movement loop is deeply unintuitive and completely undocumented. Provide help to whomever needs to look at this code next. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxxxx> --- xen/arch/x86/setup.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index caf235c628..f84e1cd79c 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1432,6 +1432,11 @@ void asmlinkage __init noreturn __start_xen(unsigned long mbi_p) /* Is the region suitable for relocating the multiboot modules? */ for ( j = mbi->mods_count - 1; j >= 0; j-- ) { + /* + * 'headroom' is a guess for the decompressed size and + * decompressor overheads of mod[0] (the dom0 kernel). When we + * move mod[0], we incorporate this as extra space at the start. + */ unsigned long headroom = j ? 0 : modules_headroom; unsigned long size = PAGE_ALIGN(headroom + mod[j].mod_end); -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |