[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] x86/setup: Don't skip 2MiB underneath relocated Xen image
commit 707db77a380b96025bae8bc4322da0b64819d3b7 Author: David Woodhouse <dwmw@xxxxxxxxxxxx> AuthorDate: Sat Feb 1 00:32:58 2020 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Fri Feb 14 18:01:52 2020 +0000 x86/setup: Don't skip 2MiB underneath relocated Xen image Set 'e' correctly to reflect the location that Xen is actually relocated to from its default 2MiB location. Not 2MiB below that. This is only vaguely a bug fix. The "missing" 2MiB would have been used in the end, and fed to the allocator. It's just that other things don't get to sit right up *next* to the Xen image, and it isn't very tidy. For live update, I'd quite like a single contiguous region for the reserved bootmem and Xen, allowing the 'slack' in the former to be used when Xen itself grows larger. Let's not allow 2MiB of random heap pages to get in the way... Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/setup.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 3fbaee156d..81e40ce3de 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1084,9 +1084,9 @@ void __init noreturn __start_xen(unsigned long mbi_p) unsigned long pte_update_limit; /* Select relocation address. */ - e = end - reloc_size; - xen_phys_start = e; - bootsym(trampoline_xen_phys_start) = e; + xen_phys_start = end - reloc_size; + e = xen_phys_start + XEN_IMG_OFFSET; + bootsym(trampoline_xen_phys_start) = xen_phys_start; /* * No PTEs pointing above this address are candidates for relocation. @@ -1094,7 +1094,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) * and the beginning of region for destination image some PTEs may * point to addresses in range [e, e + XEN_IMG_OFFSET). */ - pte_update_limit = PFN_DOWN(e + XEN_IMG_OFFSET); + pte_update_limit = PFN_DOWN(e); /* * Perform relocation to new physical address. @@ -1103,7 +1103,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) * data until after we have switched to the relocated pagetables! */ barrier(); - move_memory(e + XEN_IMG_OFFSET, XEN_IMG_OFFSET, _end - _start, 1); + move_memory(e, XEN_IMG_OFFSET, _end - _start, 1); /* Walk initial pagetables, relocating page directory entries. */ pl4e = __va(__pa(idle_pg_table)); -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |