From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752150AbdFTTUw (ORCPT ); Tue, 20 Jun 2017 15:20:52 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:45735 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752117AbdFTTUs (ORCPT ); Tue, 20 Jun 2017 15:20:48 -0400 Date: Tue, 20 Jun 2017 21:20:43 +0200 (CEST) From: Thomas Gleixner To: Vitaly Kuznetsov cc: devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, x86@kernel.org, Stephen Hemminger , Haiyang Zhang , "K. Y. Srinivasan" , Jork Loeser , Ladi Prosek Subject: Re: [PATCH 1/2] hyper-v: check frequency MSRs presence according to the specification In-Reply-To: <20170619022338.7704-2-vkuznets@redhat.com> Message-ID: References: <20170619022338.7704-1-vkuznets@redhat.com> <20170619022338.7704-2-vkuznets@redhat.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 19 Jun 2017, Vitaly Kuznetsov wrote: > +#define HV_X64_ACCESS_FREQUENCY_MSRS (1 << 11) > > /* > * Basic SynIC MSRs (HV_X64_MSR_SCONTROL through HV_X64_MSR_EOM > @@ -73,6 +67,9 @@ > */ > #define HV_X64_MSR_STAT_PAGES_AVAILABLE (1 << 8) > > +/* Frequency MSRs available */ > +#define HV_FEATURE_FREQUENCY_MSRS_AVAILABELE (1 << 8) s/AVAILABELE/AVAILABLE/ please > + > /* Crash MSR available */ > #define HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE (1 << 10) > > diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c > index 04cb8d3..250f432 100644 > --- a/arch/x86/kernel/cpu/mshyperv.c > +++ b/arch/x86/kernel/cpu/mshyperv.c > @@ -194,7 +194,8 @@ static void __init ms_hyperv_init_platform(void) > } > > #ifdef CONFIG_X86_LOCAL_APIC > - if (ms_hyperv.features & HV_X64_MSR_APIC_FREQUENCY_AVAILABLE) { > + if (ms_hyperv.features & HV_X64_ACCESS_FREQUENCY_MSRS && > + ms_hyperv.misc_features & HV_FEATURE_FREQUENCY_MSRS_AVAILABELE) { > /* > * Get the APIC frequency. > */ > -- > 2.9.4 > >