x86/efi: Apply EFI Memory Attributes after kexec

Kexec bypasses EFI's switch to virtual mode. In exchange, it has its own
routine, kexec_enter_virtual_mode(), which replays the mappings made by
the original kernel. Unfortunately, that function fails to reinstate
EFI's memory attributes, which would've otherwise been set after
entering virtual mode. Remediate this by calling
efi_runtime_update_mappings() within kexec's routine.

Signed-off-by: Nicolas Saenz Julienne <nsaenz@amazon.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Nicolas Saenz Julienne 2024-11-12 18:52:17 +00:00 committed by Ard Biesheuvel
parent 7eb4e1dd71
commit 21b1a7f7ae

View File

@ -765,6 +765,7 @@ static void __init kexec_enter_virtual_mode(void)
efi_sync_low_kernel_mappings(); efi_sync_low_kernel_mappings();
efi_native_runtime_setup(); efi_native_runtime_setup();
efi_runtime_update_mappings();
#endif #endif
} }