Skip to content

Commit d57d6fe

Browse files
brenns10liuw
authored andcommitted
drivers: hv: log when enabling crash_kexec_post_notifiers
Recently I went down a rabbit hole looking at a race condition in panic() on a Hyper-V guest. I assumed, since it was missing from the command line, that crash_kexec_post_notifiers was disabled. Only after a rather long reproduction and analysis process did I learn that Hyper-V actually enables this setting unconditionally. Users and debuggers alike would like to know when these things happen. I think it would be good to print a message to the kernel log when this happens, so that a grep for "crash_kexec_post_notifiers" shows relevant results. Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Link: https://lore.kernel.org/r/20220215013735.358327-1-stephen.s.brennan@oracle.com Signed-off-by: Wei Liu <wei.liu@kernel.org>
1 parent 6de74d1 commit d57d6fe

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/hv/hv_common.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,10 @@ int __init hv_common_init(void)
7979
* calling crash enlightment interface before running kdump
8080
* kernel.
8181
*/
82-
if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE)
82+
if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) {
8383
crash_kexec_post_notifiers = true;
84+
pr_info("Hyper-V: enabling crash_kexec_post_notifiers\n");
85+
}
8486

8587
/*
8688
* Allocate the per-CPU state for the hypercall input arg.

0 commit comments

Comments
 (0)