From: Bradley Morgan <include@grrlz.net>
To: akpm@linux-foundation.org
Cc: baoquan.he@linux.dev, pmladek@suse.com,
feng.tang@linux.alibaba.com, gregkh@linuxfoundation.org,
arnd@arndb.de, corbet@lwn.net, rdunlap@infradead.org,
gpiccoli@igalia.com, kexec@lists.infradead.org,
linux-kernel@vger.kernel.org, include@grrlz.net
Subject: [RFC PATCH 2/4] panic: run the pre kdump list before crash kexec
Date: Sat, 11 Jul 2026 00:22:51 +0000 [thread overview]
Message-ID: <20260711002253.1115-3-include@grrlz.net> (raw)
In-Reply-To: <20260711002253.1115-1-include@grrlz.net>
Call the new list unconditionally in vpanic, right before the
early crash kexec. The legacy list, crash_kexec_post_notifiers
and the cpu shutdown sequence are untouched. Also note in the
kernel parameters entry that the option has no effect on the
pre kdump list.
Signed-off-by: Bradley Morgan <include@grrlz.net>
---
Documentation/admin-guide/kernel-parameters.txt | 3 +++
kernel/panic.c | 7 +++++++
2 files changed, 10 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index b5493a7f8f22..a77ecf3bd564 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -1042,6 +1042,9 @@ Kernel parameters
or extra data dumped by panic_print. Note that some
configurations enable this option unconditionally,
like Hyper-V, PowerPC (fadump) and AMD SEV-SNP.
+ This option does not affect the pre kdump notifier
+ list (see include/linux/panic_notifier.h), which
+ always runs before the jump to the kdump kernel.
crashkernel=size[KMG][@offset[KMG]]
[KNL,EARLY] Using kexec, Linux can switch to a 'crash kernel'
diff --git a/kernel/panic.c b/kernel/panic.c
index 94ce7a94f118..f9ad0250da67 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -664,6 +664,13 @@ void vpanic(const char *fmt, va_list args)
*/
kgdb_panic(buf);
+ /*
+ * Tell the hypervisor or firmware about the panic. This runs on
+ * every panic, before a potential crash kexec, so the upcall is
+ * not lost when a crash kernel is loaded.
+ */
+ panic_pre_kdump_notify(buf);
+
/*
* If we have crashed and we have a crash kernel loaded let it handle
* everything else.
--
2.53.0
next prev parent reply other threads:[~2026-07-11 0:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-11 0:22 [RFC PATCH 0/4] panic: a pre kdump notifier list for hypervisor upcalls Bradley Morgan
2026-07-11 0:22 ` [RFC PATCH 1/4] panic: add a pre kdump notifier list Bradley Morgan
2026-07-11 0:22 ` Bradley Morgan [this message]
2026-07-11 0:22 ` [RFC PATCH 3/4] misc/pvpanic: notify the host on the pre kdump list Bradley Morgan
2026-07-11 0:22 ` [RFC PATCH 4/4] MAINTAINERS: add an entry for the pre kdump notifier list Bradley Morgan
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=20260711002253.1115-3-include@grrlz.net \
--to=include@grrlz.net \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=baoquan.he@linux.dev \
--cc=corbet@lwn.net \
--cc=feng.tang@linux.alibaba.com \
--cc=gpiccoli@igalia.com \
--cc=gregkh@linuxfoundation.org \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rdunlap@infradead.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