x86: refine link time stub area related assertion
authorJan Beulich <jbeulich@suse.com>
Fri, 17 Jan 2020 15:15:28 +0000 (16:15 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 17 Jan 2020 15:15:28 +0000 (16:15 +0100)
commit3c4b2eef4941c8a81d04337c6df31175a881635f
treea241519ce996a61d8e632ed265c95728f192e13b
parentbbf283f853f8c0e4d29248dd44d3b0e0abc07629
x86: refine link time stub area related assertion

While it has been me to introduce this, the use of | there has become
(and perhaps was from the very beginning) misleading. Rather than
avoiding the right side of it when linking the xen.efi intermediate file
at a different base address, make the expression cope with that case,
thus verifying placement on every step.

Furthermore the original check was too strict: We don't use one page per
CPU, so account for this as well. This involves moving the
STUBS_PER_PAGE definition and making DIV_ROUND_UP() accessible from
assembly (and hence the linker script); move a few other potentially
generally useful definitions along with it.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/xen.lds.S
xen/include/asm-x86/config.h
xen/include/asm-x86/processor.h
xen/include/xen/lib.h