summaryrefslogtreecommitdiff
path: root/drivers/hv/hv_common.c
diff options
context:
space:
mode:
authorStephen Brennan <stephen.s.brennan@oracle.com>2022-02-14 17:37:35 -0800
committerWei Liu <wei.liu@kernel.org>2022-02-18 13:09:38 +0000
commitd57d6fe5bf3463aad1332ecfc7555a6888b04fd9 (patch)
treee7fe0e7acafcf85291cff7dfd4355ee6984cb296 /drivers/hv/hv_common.c
parent6de74d1069b821e96460d0fc2edfc35785db04fb (diff)
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>
Diffstat (limited to 'drivers/hv/hv_common.c')
-rw-r--r--drivers/hv/hv_common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c
index 181d16bbf49d..c1dd21d0d7ef 100644
--- a/drivers/hv/hv_common.c
+++ b/drivers/hv/hv_common.c
@@ -79,8 +79,10 @@ int __init hv_common_init(void)
* calling crash enlightment interface before running kdump
* kernel.
*/
- if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE)
+ if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) {
crash_kexec_post_notifiers = true;
+ pr_info("Hyper-V: enabling crash_kexec_post_notifiers\n");
+ }
/*
* Allocate the per-CPU state for the hypercall input arg.