Re: [PATCH 1/2] hyper-v: check frequency MSRs presence according to the specification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> 
> 
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux