EFI: don't convert memory marked for runtime use to ordinary RAM
authorJan Beulich <jbeulich@suse.com>
Mon, 31 Oct 2022 12:22:17 +0000 (13:22 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 31 Oct 2022 12:22:17 +0000 (13:22 +0100)
commit54f8ed80c8308e65c3f57ae6cbd130f43f5ecbbd
tree7260c1f22b708a60cc9557e2e2f0e1804ad19e51
parentd4a11d6a22cf73ac7441750e5e8113779348885e
EFI: don't convert memory marked for runtime use to ordinary RAM

efi_init_memory() in both relevant places is treating EFI_MEMORY_RUNTIME
higher priority than the type of the range. To avoid accessing memory at
runtime which was re-used for other purposes, make
efi_arch_process_memory_map() follow suit. While in theory the same would
apply to EfiACPIReclaimMemory, we don't actually "reclaim" or clobber
that memory (converted to E820_ACPI on x86) there (and it would be a bug
if the Dom0 kernel tried to reclaim the range, bypassing Xen's memory
management, plus it would be at least bogus if it clobbered that space),
hence that type's handling can be left alone.

Fixes: bf6501a62e80 ("x86-64: EFI boot code")
Fixes: facac0af87ef ("x86-64: EFI runtime code")
Fixes: 6d70ea10d49f ("Add ARM EFI boot support")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
master commit: f324300c8347b6aa6f9c0b18e0a90bbf44011a9a
master date: 2022-10-21 12:30:24 +0200
xen/arch/arm/efi/efi-boot.h
xen/arch/x86/efi/efi-boot.h