Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1653145 > unrolled thread

[PATCH v5 02/10] x86/hyper-v: stash the max number of virtual/logical processor

Started byVitaly Kuznetsov <vkuznets@redhat.com>
First post2017-05-30 13:40 +0200
Last post2017-05-31 16:40 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v5 02/10] x86/hyper-v: stash the max number of virtual/logical processor Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-05-30 13:40 +0200
    Re: [PATCH v5 02/10] x86/hyper-v: stash the max number of  virtual/logical processor Stephen Hemminger <stephen@networkplumber.org> - 2017-05-30 19:00 +0200
      Re: [PATCH v5 02/10] x86/hyper-v: stash the max number of virtual/logical processor Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-05-31 16:40 +0200

#1653145 — [PATCH v5 02/10] x86/hyper-v: stash the max number of virtual/logical processor

FromVitaly Kuznetsov <vkuznets@redhat.com>
Date2017-05-30 13:40 +0200
Subject[PATCH v5 02/10] x86/hyper-v: stash the max number of virtual/logical processor
Message-ID<tMNFf-6JG-17@gated-at.bofh.it>
Max virtual processor will be needed for 'extended' hypercalls supporting
more than 64 vCPUs. While on it, unify on 'Hyper-V' in mshyperv.c as we
currently have a mix, report acquired misc features as well.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Tested-by: Simon Xiao <sixiao@microsoft.com>
Tested-by: Srikanth Myakam <v-srm@microsoft.com>
---
Changes since v4:
- '%d' -> '%u' [Andy Shevchenko]
---
 arch/x86/include/asm/mshyperv.h |  2 ++
 arch/x86/kernel/cpu/mshyperv.c  | 12 +++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
index 91acec7..d42b6eb 100644
--- a/arch/x86/include/asm/mshyperv.h
+++ b/arch/x86/include/asm/mshyperv.h
@@ -29,6 +29,8 @@ struct ms_hyperv_info {
 	u32 features;
 	u32 misc_features;
 	u32 hints;
+	u32 max_vp_index;
+	u32 max_lp_index;
 };
 
 extern struct ms_hyperv_info ms_hyperv;
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 04cb8d3..bdcc433 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -175,9 +175,15 @@ static void __init ms_hyperv_init_platform(void)
 	ms_hyperv.misc_features = cpuid_edx(HYPERV_CPUID_FEATURES);
 	ms_hyperv.hints    = cpuid_eax(HYPERV_CPUID_ENLIGHTMENT_INFO);
 
-	pr_info("HyperV: features 0x%x, hints 0x%x\n",
+	pr_info("Hyper-V: features 0x%x, hints 0x%x\n",
 		ms_hyperv.features, ms_hyperv.hints);
 
+	ms_hyperv.max_vp_index = cpuid_eax(HVCPUID_IMPLEMENTATION_LIMITS);
+	ms_hyperv.max_lp_index = cpuid_ebx(HVCPUID_IMPLEMENTATION_LIMITS);
+
+	pr_info("Hyper-V: max %u virtual processors, %u logical processors\n",
+		ms_hyperv.max_vp_index, ms_hyperv.max_lp_index);
+
 	/*
 	 * Extract host information.
 	 */
@@ -203,7 +209,7 @@ static void __init ms_hyperv_init_platform(void)
 		rdmsrl(HV_X64_MSR_APIC_FREQUENCY, hv_lapic_frequency);
 		hv_lapic_frequency = div_u64(hv_lapic_frequency, HZ);
 		lapic_timer_frequency = hv_lapic_frequency;
-		pr_info("HyperV: LAPIC Timer Frequency: %#x\n",
+		pr_info("Hyper-V: LAPIC Timer Frequency: %#x\n",
 			lapic_timer_frequency);
 	}
 
@@ -237,7 +243,7 @@ static void __init ms_hyperv_init_platform(void)
 }
 
 const __refconst struct hypervisor_x86 x86_hyper_ms_hyperv = {
-	.name			= "Microsoft HyperV",
+	.name			= "Microsoft Hyper-V",
 	.detect			= ms_hyperv_platform,
 	.init_platform		= ms_hyperv_init_platform,
 };
-- 
2.9.4

[toc] | [next] | [standalone]


#1653392 — Re: [PATCH v5 02/10] x86/hyper-v: stash the max number of virtual/logical processor

FromStephen Hemminger <stephen@networkplumber.org>
Date2017-05-30 19:00 +0200
SubjectRe: [PATCH v5 02/10] x86/hyper-v: stash the max number of virtual/logical processor
Message-ID<tMSEW-1o1-17@gated-at.bofh.it>
In reply to#1653145
On Tue, 30 May 2017 13:34:16 +0200
Vitaly Kuznetsov <vkuznets@redhat.com> wrote:

> diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
> index 04cb8d3..bdcc433 100644
> --- a/arch/x86/kernel/cpu/mshyperv.c
> +++ b/arch/x86/kernel/cpu/mshyperv.c
> @@ -175,9 +175,15 @@ static void __init ms_hyperv_init_platform(void)
>  	ms_hyperv.misc_features = cpuid_edx(HYPERV_CPUID_FEATURES);
>  	ms_hyperv.hints    = cpuid_eax(HYPERV_CPUID_ENLIGHTMENT_INFO);
>  
> -	pr_info("HyperV: features 0x%x, hints 0x%x\n",
> +	pr_info("Hyper-V: features 0x%x, hints 0x%x\n",
>  		ms_hyperv.features, ms_hyperv.hints);

>  
> +	ms_hyperv.max_vp_index = cpuid_eax(HVCPUID_IMPLEMENTATION_LIMITS);
> +	ms_hyperv.max_lp_index = cpuid_ebx(HVCPUID_IMPLEMENTATION_LIMITS);
> +
> +	pr_info("Hyper-V: max %u virtual processors, %u logical processors\n",
> +		ms_hyperv.max_vp_index, ms_hyperv.max_lp_index);
> +

I understand as developer why you may need to log stuff.
Do we really need more logging here? Why not pr_debug()?

[toc] | [prev] | [next] | [standalone]


#1654315

FromVitaly Kuznetsov <vkuznets@redhat.com>
Date2017-05-31 16:40 +0200
Message-ID<tNcX0-62R-11@gated-at.bofh.it>
In reply to#1653392
Stephen Hemminger <stephen@networkplumber.org> writes:

> On Tue, 30 May 2017 13:34:16 +0200
> Vitaly Kuznetsov <vkuznets@redhat.com> wrote:
>
>> diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
>> index 04cb8d3..bdcc433 100644
>> --- a/arch/x86/kernel/cpu/mshyperv.c
>> +++ b/arch/x86/kernel/cpu/mshyperv.c
>> @@ -175,9 +175,15 @@ static void __init ms_hyperv_init_platform(void)
>>  	ms_hyperv.misc_features = cpuid_edx(HYPERV_CPUID_FEATURES);
>>  	ms_hyperv.hints    = cpuid_eax(HYPERV_CPUID_ENLIGHTMENT_INFO);
>>  
>> -	pr_info("HyperV: features 0x%x, hints 0x%x\n",
>> +	pr_info("Hyper-V: features 0x%x, hints 0x%x\n",
>>  		ms_hyperv.features, ms_hyperv.hints);
>
>>  
>> +	ms_hyperv.max_vp_index = cpuid_eax(HVCPUID_IMPLEMENTATION_LIMITS);
>> +	ms_hyperv.max_lp_index = cpuid_ebx(HVCPUID_IMPLEMENTATION_LIMITS);
>> +
>> +	pr_info("Hyper-V: max %u virtual processors, %u logical processors\n",
>> +		ms_hyperv.max_vp_index, ms_hyperv.max_lp_index);
>> +
>
> I understand as developer why you may need to log stuff.
> Do we really need more logging here? Why not pr_debug()?

Agreed, lets do pr_debug() instead.

-- 
  Vitaly

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web