x86/boot: Drop xen_virt_end
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 29 Nov 2021 19:01:50 +0000 (19:01 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 2 Dec 2021 20:02:55 +0000 (20:02 +0000)
commitc182e89d0b341d2efc930c2e1211d3e866c0effb
treedf776f06a476c0065c1202b769296cffae48d136
parentffa5d037c78fe175f31373deec0759ff8cc8d66c
x86/boot: Drop xen_virt_end

The calculation in __start_xen() for xen_virt_end is an opencoding of
ROUNDUP(_end, 2M).  This is __2M_rwdata_end as provided by the linker script.

This corrects the bound calculations in arch_livepatch_init() and
update_xen_mappings() to not enforce 2M alignment when Xen is not compiled
with CONFIG_XEN_ALIGN_2M.

Furthermore, since 52975142d154 ("x86/boot: Create the l2_xenmap[] mappings
dynamically"), there have not been extraneous mappings to delete, meaning that
the call to destroy_xen_mappings() has been a no-op.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/livepatch.c
xen/arch/x86/mm.c
xen/arch/x86/setup.c
xen/include/asm-x86/x86_64/page.h