From: Steven Rostedt <rostedt@goodmis.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Mike Rapoport <mike.rapoport@gmail.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ard Biesheuvel <ardb@kernel.org>
Subject: Re: reserve_mem command line option causing a reboot but not by the kernel
Date: Tue, 8 Oct 2024 14:17:02 -0400 [thread overview]
Message-ID: <20241008141702.31bae0ee@gandalf.local.home> (raw)
In-Reply-To: <20241008132259.52a5f274@gandalf.local.home>
On Tue, 8 Oct 2024 13:22:59 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> It appears that grub does indeed search for "mem=" (without looking for
> something before it) in the kernel command line.
>
> https://github.com/jezze/grub-legacy/blob/master/stage2/boot.c#L275
>
> Thus, "reserve_mem=" (or any other "mem=" option) cannot be used with legacy
> grub installs :-p
But it only looks at the first instance of "mem=". So I added "testmem=16G"
to the command line (giving lots of memory to fool grub, and the kernel
fixes it after the decompression) before the "reserve_mem", and now I can
use "reserve_mem" on this test box (and it preserves the memory across
boots!).
<...>-2378 [000] dN.1. 124.665568: clear_local_APIC <-disable_local_APIC
<...>-2378 [000] dN.1. 124.665569: mcheck_cpu_clear <-native_stop_other_cpus
<...>-2378 [000] dN.1. 124.665569: mce_intel_feature_clear <-native_stop_other_cpus
<...>-2378 [000] dN.1. 124.665569: lmce_supported <-mce_intel_feature_clear
<...>-2378 [000] dN.1. 124.665570: lapic_shutdown <-native_machine_shutdown
<...>-2378 [000] dN.1. 124.665570: clear_local_APIC <-lapic_shutdown
<...>-2378 [000] dN.1. 124.665570: restore_boot_irq_mode <-native_machine_shutdown
<...>-2378 [000] dN.1. 124.665571: native_restore_boot_irq_mode <-native_machine_shutdown
<...>-2378 [000] dN.1. 124.665571: disconnect_bsp_APIC <-native_machine_shutdown
<...>-2378 [000] dN.1. 124.665572: hpet_disable <-native_machine_shutdown
<...>-2378 [000] dN.1. 124.665572: iommu_shutdown_noop <-native_machine_shutdown
<...>-2378 [000] dN.1. 124.665572: native_machine_emergency_restart <-__do_sys_reboot
<...>-2378 [000] dN.1. 124.665572: tboot_shutdown <-native_machine_emergency_restart
<...>-2378 [000] dN.1. 124.665573: machine_real_restart <-native_machine_emergency_restart
<...>-2378 [000] dN.1. 124.665573: _raw_spin_lock <-machine_real_restart
<...>-2378 [000] dN.1. 124.665574: preempt_count_add <-_raw_spin_lock
<...>-2378 [000] dN.2. 124.665574: rtc_cmos_write <-machine_real_restart
<...>-2378 [000] dN.2. 124.665576: _raw_spin_unlock <-machine_real_restart
<...>-2378 [000] dN.2. 124.665577: preempt_count_sub <-_raw_spin_unlock
<...>-2378 [000] dN.1. 124.665577: load_trampoline_pgtable <-machine_real_restart
<...>-2378 [000] dN.1. 124.665578: __flush_tlb_all <-machine_real_restart
<...>-2378 [000] dN.1. 124.665578: native_flush_tlb_global <-__flush_tlb_all
But this machine did find a bug in the code where I need to send out a fix for.
-- Steve
prev parent reply other threads:[~2024-10-08 18:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-06 17:32 Steven Rostedt
2024-10-08 17:22 ` Steven Rostedt
2024-10-08 18:17 ` Steven Rostedt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241008141702.31bae0ee@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=ardb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=mike.rapoport@gmail.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®