[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241008141702.31bae0ee@gandalf.local.home>
Date: Tue, 8 Oct 2024 14:17:02 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Mike Rapoport <mike.rapoport@...il.com>, Masami Hiramatsu
<mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Linus Torvalds <torvalds@...ux-foundation.org>, Peter Zijlstra
<peterz@...radead.org>, Thomas Gleixner <tglx@...utronix.de>, Ard
Biesheuvel <ardb@...nel.org>
Subject: Re: reserve_mem command line option causing a reboot but not by the
kernel
On Tue, 8 Oct 2024 13:22:59 -0400
Steven Rostedt <rostedt@...dmis.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
Powered by blists - more mailing lists