x86/Hyper-V: Trigger crash enlightenment only once during system crash.
authorTianyu Lan <Tianyu.Lan@microsoft.com>
Mon, 6 Apr 2020 15:53:28 +0000 (08:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Apr 2020 08:36:24 +0000 (10:36 +0200)
commit1ed38a98478fb2b372cfdf47dfd92e26e830c36c
tree7ad7d409ce5beb93863e031b563c9ebf9255ebbf
parent9f38f7b46de0747c1909e8c557aa21715dce20c5
x86/Hyper-V: Trigger crash enlightenment only once during system crash.

commit 73f26e526f19afb3a06b76b970a76bcac2cafd05 upstream.

When a guest VM panics, Hyper-V should be notified only once via the
crash synthetic MSRs.  Current Linux code might write these crash MSRs
twice during a system panic:
1) hyperv_panic/die_event() calling hyperv_report_panic()
2) hv_kmsg_dump() calling hyperv_report_panic_msg()

Fix this by not calling hyperv_report_panic() if a kmsg dump has been
successfully registered.  The notification will happen later via
hyperv_report_panic_msg().

Fixes: 7ed4325a44ea ("Drivers: hv: vmbus: Make panic reporting to be more useful")
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
Link: https://lore.kernel.org/r/20200406155331.2105-4-Tianyu.Lan@microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/vmbus_drv.c