mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
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@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Jason Andryuk <jason.andryuk@gmail.com>
This commit is contained in:
1 parent
fcefb2a247
commit
49c810e867
1 file changed
+5
@@ -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);
|
||||
|
||||
|
||||