Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753263AbbGBLXE (ORCPT ); Thu, 2 Jul 2015 07:23:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42815 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753027AbbGBLW6 (ORCPT ); Thu, 2 Jul 2015 07:22:58 -0400 From: Vitaly Kuznetsov To: "Denis V. Lunev" Cc: Haiyang Zhang , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Nick Meier , Andrey Smetanin , devel@linuxdriverproject.org, "K. Y. Srinivasan" Subject: Re: [RFC PATCH 1/1] mshyperv: fix recognition of Hyper-V guest crash MSR's References: <1435832238-2789-1-git-send-email-den@openvz.org> Date: Thu, 02 Jul 2015 13:22:54 +0200 In-Reply-To: <1435832238-2789-1-git-send-email-den@openvz.org> (Denis V. Lunev's message of "Thu, 2 Jul 2015 13:17:18 +0300") Message-ID: <87egkqst0x.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2922 Lines: 80 "Denis V. Lunev" writes: > From: Andrey Smetanin > > Hypervisor Top Level Functional Specification v3.1/4.0 notes that cpuid > (0x40000003) EDX's 10th bit should be used to check that Hyper-V guest > crash MSR's functionality available. > > This patch should fix this recognition. Currently the code checks EAX > register instead of EDX. > > Signed-off-by: Andrey Smetanin > Signed-off-by: Denis V. Lunev > CC: Nick Meier > CC: K. Y. Srinivasan > CC: Haiyang Zhang Something went wrong and I don't see K.Y. on the CC: list of your email. Fixed now. > --- > arch/x86/include/asm/mshyperv.h | 1 + > arch/x86/kernel/cpu/mshyperv.c | 1 + > drivers/hv/vmbus_drv.c | 4 ++-- > 3 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h > index c163215..eebe433 100644 > --- a/arch/x86/include/asm/mshyperv.h > +++ b/arch/x86/include/asm/mshyperv.h > @@ -7,6 +7,7 @@ > > struct ms_hyperv_info { > u32 features; > + u32 misc_features; > u32 hints; > }; > > diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c > index aad4bd8..6d172a2 100644 > --- a/arch/x86/kernel/cpu/mshyperv.c > +++ b/arch/x86/kernel/cpu/mshyperv.c > @@ -114,6 +114,7 @@ static void __init ms_hyperv_init_platform(void) > * Extract the features and hints > */ > ms_hyperv.features = cpuid_eax(HYPERV_CPUID_FEATURES); > + ms_hyperv.misc_features = cpuid_edx(HYPERV_CPUID_FEATURES); > ms_hyperv.hints = cpuid_eax(HYPERV_CPUID_ENLIGHTMENT_INFO); > > printk(KERN_INFO "HyperV: features 0x%x, hints 0x%x\n", > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c > index cf20400..67af13a 100644 > --- a/drivers/hv/vmbus_drv.c > +++ b/drivers/hv/vmbus_drv.c > @@ -841,7 +841,7 @@ static int vmbus_bus_init(int irq) > /* > * Only register if the crash MSRs are available > */ > - if (ms_hyperv.features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) { > + if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) { > atomic_notifier_chain_register(&panic_notifier_list, > &hyperv_panic_block); > } > @@ -1110,7 +1110,7 @@ static void __exit vmbus_exit(void) > hv_remove_vmbus_irq(); > tasklet_kill(&msg_dpc); > vmbus_free_channels(); > - if (ms_hyperv.features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) { > + if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) { > atomic_notifier_chain_unregister(&panic_notifier_list, > &hyperv_panic_block); > } -- Vitaly -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/