[PATCH] x86: default to reboot via ACPI

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Avi Kivity
Date: Monday, August 25, 2008 - 3:11 am

Triple-fault and keyboard reset may assert INIT instead of RESET; however
INIT is blocked when Intel VT is enabled.  This leads to a partially reset
machine when invoking emergency_restart via sysrq-b: the processor is still
working but other parts of the system are dead.

Default to rebooting via ACPI, which correctly asserts RESET and reboots the
machine.

This is safe since we will fall back to keyboard reset and triple fault if
acpi is not enabled or if the reset is not successful.

Signed-off-by: Avi Kivity <avi@qumranet.com>
---
 arch/x86/kernel/reboot.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 724adfc..f4c93f1 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -29,7 +29,11 @@ EXPORT_SYMBOL(pm_power_off);
 
 static const struct desc_ptr no_idt = {};
 static int reboot_mode;
-enum reboot_type reboot_type = BOOT_KBD;
+/*
+ * Keyboard reset and triple fault may result in INIT, not RESET, which
+ * doesn't work when we're in vmx root mode.  Try ACPI first.
+ */
+enum reboot_type reboot_type = BOOT_ACPI;
 int reboot_force;
 
 #if defined(CONFIG_X86_32) && defined(CONFIG_SMP)
-- 
1.6.0

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] x86: default to reboot via ACPI, Avi Kivity, (Mon Aug 25, 3:11 am)
Re: [PATCH] x86: default to reboot via ACPI, Ingo Molnar, (Mon Aug 25, 3:32 am)
Re: [PATCH] x86: default to reboot via ACPI, Pavel Machek, (Tue Aug 26, 2:50 am)
Re: [PATCH] x86: default to reboot via ACPI, Avi Kivity, (Tue Aug 26, 3:05 am)
Re: [PATCH] x86: default to reboot via ACPI, Alan Cox, (Tue Aug 26, 3:33 am)
Re: [PATCH] x86: default to reboot via ACPI, Ingo Molnar, (Tue Aug 26, 3:36 am)
Re: [PATCH] x86: default to reboot via ACPI, Alan Cox, (Tue Aug 26, 3:52 am)
Re: [PATCH] x86: default to reboot via ACPI, Frans Meulenbroeks, (Tue Aug 26, 4:03 am)
Re: [PATCH] x86: default to reboot via ACPI, Ingo Molnar, (Tue Aug 26, 4:07 am)
Re: [PATCH] x86: default to reboot via ACPI, Andi Kleen, (Tue Aug 26, 4:26 am)
Re: [PATCH] x86: default to reboot via ACPI, Avi Kivity, (Tue Aug 26, 5:14 am)
Re: [PATCH] x86: default to reboot via ACPI, Andi Kleen, (Tue Aug 26, 5:31 am)
Re: [PATCH] x86: default to reboot via ACPI, Maciej W. Rozycki, (Tue Aug 26, 6:24 am)
Re: [PATCH] x86: default to reboot via ACPI, Avi Kivity, (Tue Aug 26, 6:33 am)
Re: [PATCH] x86: default to reboot via ACPI, Pavel Machek, (Tue Aug 26, 7:12 am)
Re: [PATCH] x86: default to reboot via ACPI, Maciej W. Rozycki, (Tue Aug 26, 7:24 am)
Re: [PATCH] x86: default to reboot via ACPI, Maciej W. Rozycki, (Tue Aug 26, 7:50 am)
Re: [PATCH] x86: default to reboot via ACPI, Alan Cox, (Tue Aug 26, 9:10 am)
Re: [PATCH] x86: default to reboot via ACPI, Andi Kleen, (Tue Aug 26, 9:16 am)
Re: [PATCH] x86: default to reboot via ACPI, Pavel Machek, (Wed Aug 27, 2:18 am)
Re: [PATCH] x86: default to reboot via ACPI, Avi Kivity, (Wed Aug 27, 3:51 am)
Re: [PATCH] x86: default to reboot via ACPI, Pavel Machek, (Wed Aug 27, 6:13 am)