Linux-HyperV List
 help / color / mirror / Atom feed
From: ltykernel@gmail.com
To: kys@microsoft.com, haiyangz@microsoft.com,
	sthemmin@microsoft.com, liuwe@microsoft.com,
	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 V2 6/6] x86/Hyper-V: Report crash data in die() when panic_on_oops is set
Date: Mon, 23 Mar 2020 06:09:24 -0700	[thread overview]
Message-ID: <20200323130924.2968-7-Tianyu.Lan@microsoft.com> (raw)
In-Reply-To: <20200323130924.2968-1-Tianyu.Lan@microsoft.com>

From: Tianyu Lan <Tianyu.Lan@microsoft.com>

When oops happens with panic_on_oops unset, the oops
thread is killed by die() and system continues to run.
In such case, guest should not report crash register
data to host since system still runs. Fix it.

Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
---
 drivers/hv/vmbus_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 00447175c040..ecdb64db0e4a 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -89,7 +89,7 @@ static int hyperv_die_event(struct notifier_block *nb, unsigned long val,
 	 * Crash notify only can be triggered once. If crash notify
 	 * message is available, just report kmsg to crash buffer.
 	 */
-	if (hyperv_report_reg())
+	if (hyperv_report_reg() && panic_on_oops)
 		hyperv_report_panic(regs, val);
 	return NOTIFY_DONE;
 }
-- 
2.14.5


      parent reply	other threads:[~2020-03-23 13:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23 13:09 [PATCH V2 0/6] x86/Hyper-V: Panic code path fixes ltykernel
2020-03-23 13:09 ` [PATCH V2 1/6] x86/Hyper-V: Unload vmbus channel in hv panic callback ltykernel
2020-03-23 17:11   ` Michael Kelley
2020-03-23 13:09 ` [PATCH V2 2/6] x86/Hyper-V: Free hv_panic_page when fail to register kmsg dump ltykernel
2020-03-23 13:09 ` [PATCH V2 3/6] x86/Hyper-V: Trigger crash enlightenment only once during system crash ltykernel
2020-03-23 17:15   ` Michael Kelley
2020-03-23 13:09 ` [PATCH V2 4/6] x86/Hyper-V: Report crash register data or ksmg before running crash kernel ltykernel
2020-03-23 17:16   ` Michael Kelley
2020-03-23 13:09 ` [PATCH V2 5/6] x86/Hyper-V: Report crash register data when sysctl_record_panic_msg is not set ltykernel
2020-03-23 17:20   ` Michael Kelley
2020-03-23 13:09 ` ltykernel [this message]

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=20200323130924.2968-7-Tianyu.Lan@microsoft.com \
    --to=ltykernel@gmail.com \
    --cc=Tianyu.Lan@microsoft.com \
    --cc=haiyangz@microsoft.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=sthemmin@microsoft.com \
    --cc=vkuznets@redhat.com \
    /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