mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/4] panic, x86/vmware: Preserve crash logs before kdump
@ 2026-11-09  5:47 Zack Rusin
  2026-11-09  5:47 ` [PATCH v3 1/4] panic: Add a platform panic notifier list Zack Rusin
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Zack Rusin @ 2026-11-09  5:47 UTC (permalink / raw)
  To: Andrew Morton, Petr Mladek, Baoquan He, Mike Rapoport,
	Pasha Tatashin, Pratyush Yadav, Dave Young
  Cc: Borislav Petkov, Ajay Kaher, Alexey Makhalov, x86, Joel Granados,
	Thomas Gleixner, Ingo Molnar, Dave Hansen, H. Peter Anvin,
	virtualization, bcm-kernel-feedback-list, linux-kernel,
	John Ogness, Steven Rostedt, Sergey Senozhatsky, Kees Cook,
	Jonathan Corbet, Bo Gan, Brennan Lamoreaux, kexec, linux-doc,
	Guilherme G. Piccoli, Maaz Mombasawala, Shuah Khan, Randy Dunlap,
	Stephen Brennan, Michael Kelley, Ian Forbes, Bradley Morgan

This series lets VMware guests copy the end of their kernel log to
the host's vmware.log when they crash, before entering kdump. This
preserves diagnostic information even if the guest cannot save its
own logs or the crash dump fails.

Using the existing panic notifier list for this would require
crash_kexec_post_notifiers=1, which also runs unrelated callbacks
before kdump. Following Petr's suggestion, v3 instead adds a separate
platform panic notifier list for callbacks that need to run early.
It runs before kdump and before stopping the other CPUs. It also
covers fatal oopses that enter kdump without going through panic().
The callbacks run at most once, and the list can be disabled for
debugging with disable_panic_notifiers_platform_list.
crash_kexec_post_notifiers, the existing panic notifiers and the
kmsg dumpers are unchanged.

The VMware log sender is the first user. It uses a preallocated
8 KiB buffer and limits both the transfer size and the number of
retries. Logging is enabled by default in ordinary guests; encrypted
guests must opt in through kernel.vmware_record_panic_msg. The copy
is best-effort: kdump and reboot do not depend on it succeeding.

The separate VMware guest-crash notification, which can cause the
host to terminate the VM, is a kmsg dumper registered late in boot,
so it runs after the built-in log dumpers. It is suppressed while a
crash kernel is loaded.

Changes since v2:
- Replace the pre-kdump list and postponement parameter with the
  platform list and a debugging switch to disable it.
- Run the list in vpanic() before the other CPUs are stopped,
  instead of just before the kmsg dumpers.
- Correct the sysctl documentation heading.
- Rebase onto v7.4-rc1.

Tested on x86-64 guests on VMware Workstation, ESXi (ordinary,
SEV-SNP and TDX) and QEMU/KVM.

Platform list proposal:
https://lore.kernel.org/r/ateYxCu63pRY9EGq@pathway.suse.cz

v2:
https://lore.kernel.org/r/cover.1790014793.git.zack.rusin@broadcom.com
v1:
https://lore.kernel.org/r/cover.1788414671.git.zack.rusin@broadcom.com

Zack Rusin (4):
  panic: Add a platform panic notifier list
  x86/vmware: Add a bounded panic log sender
  x86/vmware: Add the vmware_record_panic_msg sysctl
  x86/vmware: Report guest crashes after kmsg dumpers

 .../admin-guide/kernel-parameters.txt         |  12 +
 Documentation/admin-guide/sysctl/kernel.rst   |  20 ++
 arch/x86/include/asm/vmware.h                 |   2 +
 arch/x86/kernel/cpu/vmware.c                  | 250 ++++++++++++++++++
 include/linux/panic_notifier.h                |   3 +
 kernel/crash_core.c                           |   3 +
 kernel/panic.c                                |  50 ++++
 7 files changed, 340 insertions(+)


base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-09  5:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09  5:47 [PATCH v3 0/4] panic, x86/vmware: Preserve crash logs before kdump Zack Rusin
2026-11-09  5:47 ` [PATCH v3 1/4] panic: Add a platform panic notifier list Zack Rusin
2026-11-09  5:47 ` [PATCH v3 2/4] x86/vmware: Add a bounded panic log sender Zack Rusin
2026-11-09  5:47 ` [PATCH v3 3/4] x86/vmware: Add the vmware_record_panic_msg sysctl Zack Rusin
2026-11-09  5:47 ` [PATCH v3 4/4] x86/vmware: Report guest crashes after kmsg dumpers Zack Rusin

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®