diff mbox

[v10,03/13] x86: allow EFI reboot method neither on EFI platforms...

Message ID 1480511059-14062-4-git-send-email-daniel.kiper@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Kiper Nov. 30, 2016, 1:04 p.m. UTC
..nor EFI platforms with runtime services enabled.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
---
v6 - suggestions/fixes:
   - move this commit behind "efi: create efi_enabled()" commit
     (suggested by Jan Beulich).

v5 - suggestions/fixes:
   - fix build error
     (suggested by Jan Beulich),
   - improve commit message.
---
 xen/arch/x86/shutdown.c |    3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/xen/arch/x86/shutdown.c b/xen/arch/x86/shutdown.c
index 7a1a73a..55f6840 100644
--- a/xen/arch/x86/shutdown.c
+++ b/xen/arch/x86/shutdown.c
@@ -80,6 +80,9 @@  static void __init set_reboot_type(char *str)
             break;
         str++;
     }
+
+    if ( reboot_type == BOOT_EFI && !efi_enabled(EFI_RS) )
+        reboot_type = BOOT_INVALID;
 }
 custom_param("reboot", set_reboot_type);