Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5647dbf8 authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov Committed by Greg Kroah-Hartman
Browse files

Drivers: hv: restore TSC page cleanup before kexec



We need to cleanup the TSC page before doing kexec/kdump or the new kernel
may crash if it tries to use it.

Fixes: 63ed4e0c ("Drivers: hv: vmbus: Consolidate all Hyper-V specific clocksource code")
Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d6f3609d
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -178,6 +178,10 @@ void hyperv_cleanup(void)
	/* Reset the hypercall page */
	/* Reset the hypercall page */
	hypercall_msr.as_uint64 = 0;
	hypercall_msr.as_uint64 = 0;
	wrmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);
	wrmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);

	/* Reset the TSC page */
	hypercall_msr.as_uint64 = 0;
	wrmsrl(HV_X64_MSR_REFERENCE_TSC, hypercall_msr.as_uint64);
}
}
EXPORT_SYMBOL_GPL(hyperv_cleanup);
EXPORT_SYMBOL_GPL(hyperv_cleanup);