Skip to content

Commit 4ef5c69

Browse files
committed
arch/x86: Only try EFI reboot if booted via EFI
As well as checking for the presence of "noefi" field via efi_runtime_disabled() also check that the kernel was booted with EFI. This fixes an issue on Cloud Hypervisor (which uses ACPI Hardware-Reduced) where the kernel tries to reboot via EFI even though the kernel was loaded directly into the VM via the PVH entry point. It should try and use ACPI instead. Signed-off-by: Rob Bradford <[email protected]>
1 parent 25960ca commit 4ef5c69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/kernel/reboot.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,8 @@ static int __init reboot_init(void)
518518
*/
519519
rv = dmi_check_system(reboot_dmi_table);
520520

521-
if (!rv && efi_reboot_required() && !efi_runtime_disabled())
521+
if (!rv && efi_reboot_required() && !efi_runtime_disabled() &&
522+
efi_enabled(EFI_RUNTIME_SERVICES))
522523
reboot_type = BOOT_EFI;
523524

524525
return 0;

0 commit comments

Comments
 (0)