Skip to content

x86/vmware: Preserve panic diagnostics in vmware.log

Zack Rusin kexec linux-doc lkml virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86/vmware: Add a bounded panic log senderarch/x86/include/asm/vmware.h arch/x86/kernel/cpu/vmware.c+159 -01 reply
2/4x86/vmware: Add the vmware_record_panic_msg sysctlDocumentation/admin-guide/sysctl/kernel.rst arch/x86/kernel/cpu/vmware.c+37 -03 replies
3/4x86/vmware: Report guest crashes after kmsg dumpersarch/x86/include/asm/vmware.h arch/x86/kernel/cpu/vmware.c+64 -00 replies
4/4x86/vmware: Run panic diagnostics before kdump by defaultarch/x86/kernel/cpu/vmware.c+1 -09 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMaaz Mombasawala
SeriesR-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 0/4] x86/vmware: Preserve panic diagnostics in vmware.log

A virtual machine may have neither guest-local persistent storage nor working userspace after a panic. The host's vmware.log remains available after the VM terminates, and a production encrypted guest is the only component able to export readable panic text. Hyper-V already provides this class of host-persistent panic reporting.

Add a panic-only VMware logger that copies the newest 4 KiB of the kernel log and sends it with bounded low-bandwidth RPC work. Ordinary guests enable text transfer by default; encrypted guests require an administrator to opt in through kernel.vmware_record_panic_msg. A separate late dumper reports the structured crash event after built-in dumpers and suppresses the event while a crash kernel is loaded, because a configured VMware host may terminate the VM before the reporting hypercall returns.

Patch 4 makes panic diagnostics run before kdump by default on VMware guests. This follows existing platform uses of crash_kexec_post_notifiers, with Hyper-V as the closest guest-reporting precedent. Unlike Hyper-V, VMware exposes no capability bit for this behavior. An explicit crash_kexec_post_notifiers=0 still wins, and patch 4 can be dropped without affecting patches 1 through 3.

This replaces patches 2 and 3 of Alexey's v2 posting:
https://lore.kernel.org/all/[email protected]/

The intended merge path is tip's x86/vmware branch. Boris please review the VMware transport and policy. Petr and John, please review the panic-only dumper use and registration ordering. Joel and Kees, please review the sysctl. Baoquan and the KEXEC/KDUMP team, please review the loaded-crash-kernel guard and the default in patch 4.

Zack Rusin (4):
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 x86/vmware: Run panic diagnostics before kdump by default

 Documentation/admin-guide/sysctl/kernel.rst |  14 ++
 arch/x86/include/asm/vmware.h               |   2 +
 arch/x86/kernel/cpu/vmware.c                | 245 ++++++++++++++++++++
 3 files changed, 261 insertions(+)

base-commit: cee9395acd8043be0644b25c34bfa86623f2b935

Signature · 1 line
2.53.0