From: ltykernel@gmail.com
To: kys@microsoft.com, haiyangz@microsoft.com,
sthemmin@microsoft.com, liuwe@microsoft.com, tglx@linutronix.de,
mingo@redhat.com, bp@alien8.de, hpa@zytor.com, x86@kernel.org,
michael.h.kelley@microsoft.com
Cc: Tianyu Lan <Tianyu.Lan@microsoft.com>,
linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
vkuznets@redhat.com
Subject: [PATCH 4/4] x86/Hyper-V: Report crash register data or ksmg before running crash kernel
Date: Tue, 17 Mar 2020 06:25:23 -0700 [thread overview]
Message-ID: <20200317132523.1508-5-Tianyu.Lan@microsoft.com> (raw)
In-Reply-To: <20200317132523.1508-1-Tianyu.Lan@microsoft.com>
From: Tianyu Lan <Tianyu.Lan@microsoft.com>
Hyper-V expects to get crash register data or kmsg via crash
enlightenment when guest crash happens. crash_kexec_post_notifiers
is default to be false and crash kernel runs before calling hv
panic callback and dumping kmsg. In this case, Hyper-V doesn't
get crash register data or kmsg from guest. Set crash_kexec_post
_notifiers to be true for Hyper-V VM and fix it.
Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
---
arch/x86/kernel/cpu/mshyperv.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index caa032ce3fe3..5e296a7e6036 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -263,6 +263,16 @@ static void __init ms_hyperv_init_platform(void)
cpuid_eax(HYPERV_CPUID_NESTED_FEATURES);
}
+ /*
+ * Hyper-V expects to get crash register data or kmsg when
+ * crash enlightment is available and system crashes. Set
+ * crash_kexec_post_notifiers to be true to make sure that
+ * calling crash enlightment interface before running kdump
+ * kernel.
+ */
+ if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE)
+ crash_kexec_post_notifiers = true;
+
#ifdef CONFIG_X86_LOCAL_APIC
if (ms_hyperv.features & HV_X64_ACCESS_FREQUENCY_MSRS &&
ms_hyperv.misc_features & HV_FEATURE_FREQUENCY_MSRS_AVAILABLE) {
--
2.14.5
next prev parent reply other threads:[~2020-03-17 13:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-17 13:25 [PATCH 0/4] x86/Hyper-V: Panic code path fixes ltykernel
2020-03-17 13:25 ` [PATCH 0/4] x86/Hyper-V: Unload vmbus channel in hv panic callback ltykernel
2020-03-17 17:35 ` Wei Liu
2020-03-19 8:24 ` Tianyu Lan
2020-03-18 15:58 ` Vitaly Kuznetsov
2020-03-19 0:33 ` Michael Kelley
2020-03-19 8:03 ` Vitaly Kuznetsov
2020-03-19 15:06 ` Michael Kelley
2020-03-19 8:03 ` Tianyu Lan
2020-03-17 13:25 ` [PATCH 2/4] x86/Hyper-V: Free hv_panic_page when fail to register kmsg dump ltykernel
2020-03-17 17:36 ` Wei Liu
2020-03-19 8:12 ` Tianyu Lan
2020-03-19 0:38 ` Michael Kelley
2020-03-17 13:25 ` [PATCH 3/4] x86/Hyper-V: Trigger crash enlightenment only once during system crash ltykernel
2020-03-19 0:45 ` Michael Kelley
2020-03-17 13:25 ` ltykernel [this message]
2020-03-19 0:51 ` [PATCH 4/4] x86/Hyper-V: Report crash register data or ksmg before running crash kernel Michael Kelley
2020-03-19 0:57 ` [PATCH 0/4] x86/Hyper-V: Panic code path fixes Michael Kelley
2020-03-19 14:08 ` Tianyu Lan
2020-03-19 15:14 ` Michael Kelley
2020-03-19 16:07 ` Michael Kelley
2020-03-20 2:21 ` Tianyu Lan
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=20200317132523.1508-5-Tianyu.Lan@microsoft.com \
--to=ltykernel@gmail.com \
--cc=Tianyu.Lan@microsoft.com \
--cc=bp@alien8.de \
--cc=haiyangz@microsoft.com \
--cc=hpa@zytor.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuwe@microsoft.com \
--cc=michael.h.kelley@microsoft.com \
--cc=mingo@redhat.com \
--cc=sthemmin@microsoft.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=x86@kernel.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;
as well as URLs for NNTP newsgroup(s).