diff mbox

[v6,06/15] x86: allow EFI reboot method neither on EFI platforms...

Message ID 1473711511-11931-7-git-send-email-daniel.kiper@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Kiper Sept. 12, 2016, 8:18 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>
---
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(+)

Comments

Jan Beulich Sept. 19, 2016, 12:01 p.m. UTC | #1
>>> On 12.09.16 at 22:18, <daniel.kiper@oracle.com> wrote:
> ..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>

Albeit I think the title/description is now not really fitting the
single efi_enabled() check anymore.

Jan
diff mbox

Patch

diff --git a/xen/arch/x86/shutdown.c b/xen/arch/x86/shutdown.c
index 54c2c79..b429fd0 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);