summary refs log tree commit diff
path: root/x86_64
diff options
context:
space:
mode:
authorDaniel Verkamp <dverkamp@chromium.org>2019-03-04 13:42:06 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-05 12:58:31 -0800
commitb852264e21df6066ef992168319fdae85613d22c (patch)
tree76b193d24a96c32eb37597357c46156014129a3c /x86_64
parent4547e303661006b89ce938d7739bd5c0aa647da4 (diff)
downloadcrosvm-b852264e21df6066ef992168319fdae85613d22c.tar
crosvm-b852264e21df6066ef992168319fdae85613d22c.tar.gz
crosvm-b852264e21df6066ef992168319fdae85613d22c.tar.bz2
crosvm-b852264e21df6066ef992168319fdae85613d22c.tar.lz
crosvm-b852264e21df6066ef992168319fdae85613d22c.tar.xz
crosvm-b852264e21df6066ef992168319fdae85613d22c.tar.zst
crosvm-b852264e21df6066ef992168319fdae85613d22c.zip
linux: use panic=-1 to reboot immediately on panic
This changes the default Linux kernel command line from panic=1 (reboot
one second after panic) to panic=-1 (reboot immediately on panic).  The
kernel should not normally panic; this is just to improve quality of
life for developer workflows, such as running bash as init and exiting
the shell to shut down the VM.

BUG=None
TEST=crosvm run -r vm_rootfs.img -p init=/bin/bash vm_kernel; exit shell

Change-Id: I7c9084ccf1786cd4455fd748512078e02fdb17fa
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1500872
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: David Tolnay <dtolnay@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Diffstat (limited to 'x86_64')
-rw-r--r--x86_64/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/x86_64/src/lib.rs b/x86_64/src/lib.rs
index 51c670c..fb4825c 100644
--- a/x86_64/src/lib.rs
+++ b/x86_64/src/lib.rs
@@ -510,7 +510,7 @@ impl X8664arch {
     fn get_base_linux_cmdline() -> kernel_cmdline::Cmdline {
         let mut cmdline = kernel_cmdline::Cmdline::new(CMDLINE_MAX_SIZE as usize);
         cmdline
-            .insert_str("console=ttyS0 noacpi reboot=k panic=1")
+            .insert_str("console=ttyS0 noacpi reboot=k panic=-1")
             .unwrap();
         cmdline
     }