Commit fa7bee86 authored by Demi Marie Obenour's avatar Demi Marie Obenour Committed by Ard Biesheuvel

efi: Warn if trying to reserve memory under Xen

Doing so cannot work and should never happen.
Signed-off-by: default avatarDemi Marie Obenour <demi@invisiblethingslab.com>
Tested-by: default avatarMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent 01de145d
......@@ -541,6 +541,10 @@ void __init __weak efi_arch_mem_reserve(phys_addr_t addr, u64 size) {}
*/
void __init efi_mem_reserve(phys_addr_t addr, u64 size)
{
/* efi_mem_reserve() does not work under Xen */
if (WARN_ON_ONCE(efi_enabled(EFI_PARAVIRT)))
return;
if (!memblock_is_region_reserved(addr, size))
memblock_reserve(addr, size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment