From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751961AbdAYNSH (ORCPT ); Wed, 25 Jan 2017 08:18:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33732 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751936AbdAYNSB (ORCPT ); Wed, 25 Jan 2017 08:18:01 -0500 From: Vitaly Kuznetsov To: devel@linuxdriverproject.org Cc: linux-kernel@vger.kernel.org, x86@kernel.org, "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger Subject: [PATCH 2/2] Drivers: hv: restore TSC page cleanup before kexec Date: Wed, 25 Jan 2017 14:17:55 +0100 Message-Id: <20170125131755.21652-3-vkuznets@redhat.com> In-Reply-To: <20170125131755.21652-1-vkuznets@redhat.com> References: <20170125131755.21652-1-vkuznets@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 25 Jan 2017 13:18:02 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We need to cleanup the TSC page before doing kexec/kdump or the new kernel may crash if it tries to use it. Fixes: 63ed4e0c67df ("Drivers: hv: vmbus: Consolidate all Hyper-V specific clocksource code") Signed-off-by: Vitaly Kuznetsov --- arch/x86/hyperv/hv_init.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c index d6b018b..b371d0e 100644 --- a/arch/x86/hyperv/hv_init.c +++ b/arch/x86/hyperv/hv_init.c @@ -178,6 +178,10 @@ void hyperv_cleanup(void) /* Reset the hypercall page */ hypercall_msr.as_uint64 = 0; 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); -- 2.9.3