]> xenbits.xensource.com Git - xen.git/commit
xen/riscv: Increase XEN_VIRT_SIZE
authorOleksii Kurochko <oleksii.kurochko@gmail.com>
Wed, 23 Apr 2025 07:41:42 +0000 (09:41 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 23 Apr 2025 07:41:42 +0000 (09:41 +0200)
commit16d69b2870ce7dacf47565673992131eafd03644
treee93b1214cc7b7bd8f8947d800dbb633127de6166
parent042e9616f2e67476635487f2cd530406c6e3c0c1
xen/riscv: Increase XEN_VIRT_SIZE

A randconfig job failed with the following issue:
  riscv64-linux-gnu-ld: Xen too large for early-boot assumptions

The reason is that enabling the UBSAN config increased the size of
the Xen binary.

Increase XEN_VIRT_SIZE to reserve enough space, allowing both UBSAN
and GCOV to be enabled together, with some slack for future growth.

Additionally, add checks to verify that XEN_VIRT_START is 1GB-aligned
and XEN_VIRT_SIZE is 2MB-aligned to reduce the number of page tables
needed for the initial mapping. In the future, when 2MB mappings are
used for .text (rx), .rodata (r), and .data (rw), this will also help
reduce TLB pressure.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/riscv/include/asm/config.h
xen/arch/riscv/include/asm/mm.h
xen/arch/riscv/mm.c
xen/include/xen/sections.h