* [PATCH v1] x86: hyperv: report value of misc_features @ 2020-04-07 17:27 Olaf Hering 2020-04-08 15:54 ` Vitaly Kuznetsov 0 siblings, 1 reply; 3+ messages in thread From: Olaf Hering @ 2020-04-07 17:27 UTC (permalink / raw) To: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu, Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin, x86, linux-hyperv, linux-kernel Cc: Olaf Hering A few kernel features depend on ms_hyperv.misc_features, but unlike its siblings ->features and ->hints, the value was never reported during boot. Signed-off-by: Olaf Hering <olaf@aepfle.de> --- arch/x86/kernel/cpu/mshyperv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c index caa032ce3fe3..53706fb56433 100644 --- a/arch/x86/kernel/cpu/mshyperv.c +++ b/arch/x86/kernel/cpu/mshyperv.c @@ -227,8 +227,8 @@ 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("Hyper-V: features 0x%x, hints 0x%x\n", - ms_hyperv.features, ms_hyperv.hints); + pr_info("Hyper-V: features 0x%x, hints 0x%x, misc 0x%x\n", + ms_hyperv.features, ms_hyperv.hints, ms_hyperv.misc_features); ms_hyperv.max_vp_index = cpuid_eax(HYPERV_CPUID_IMPLEMENT_LIMITS); ms_hyperv.max_lp_index = cpuid_ebx(HYPERV_CPUID_IMPLEMENT_LIMITS); ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] x86: hyperv: report value of misc_features 2020-04-07 17:27 [PATCH v1] x86: hyperv: report value of misc_features Olaf Hering @ 2020-04-08 15:54 ` Vitaly Kuznetsov 2020-04-09 16:26 ` Wei Liu 0 siblings, 1 reply; 3+ messages in thread From: Vitaly Kuznetsov @ 2020-04-08 15:54 UTC (permalink / raw) To: Olaf Hering Cc: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu, Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin, x86, linux-hyperv, linux-kernel, Michael Kelley Olaf Hering <olaf@aepfle.de> writes: > A few kernel features depend on ms_hyperv.misc_features, but unlike its > siblings ->features and ->hints, the value was never reported during boot. > > Signed-off-by: Olaf Hering <olaf@aepfle.de> > --- > arch/x86/kernel/cpu/mshyperv.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c > index caa032ce3fe3..53706fb56433 100644 > --- a/arch/x86/kernel/cpu/mshyperv.c > +++ b/arch/x86/kernel/cpu/mshyperv.c > @@ -227,8 +227,8 @@ 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("Hyper-V: features 0x%x, hints 0x%x\n", > - ms_hyperv.features, ms_hyperv.hints); > + pr_info("Hyper-V: features 0x%x, hints 0x%x, misc 0x%x\n", > + ms_hyperv.features, ms_hyperv.hints, ms_hyperv.misc_features); Several spare thoughts: I'm always struggling to remember what is what here as these names don't correspond to TLFS, could we maybe come up with better naming, e.g. "Features.EAX", "Features.EDX", "Recommendations.EAX",... On the other hand, there is more, e.g. nested virtualization features. How is it useful for all users to see this in dmesg every time? If we need it for development purposes, we can always run 'cpuid' so maybe let's drop this altogether or print only with pr_debug? (Honestly: no strong opinion here, deferring to Microsoft folks). > > ms_hyperv.max_vp_index = cpuid_eax(HYPERV_CPUID_IMPLEMENT_LIMITS); > ms_hyperv.max_lp_index = cpuid_ebx(HYPERV_CPUID_IMPLEMENT_LIMITS); > -- Vitaly ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] x86: hyperv: report value of misc_features 2020-04-08 15:54 ` Vitaly Kuznetsov @ 2020-04-09 16:26 ` Wei Liu 0 siblings, 0 replies; 3+ messages in thread From: Wei Liu @ 2020-04-09 16:26 UTC (permalink / raw) To: Vitaly Kuznetsov Cc: Olaf Hering, K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu, Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin, x86, linux-hyperv, linux-kernel, Michael Kelley On Wed, Apr 08, 2020 at 05:54:35PM +0200, Vitaly Kuznetsov wrote: > Olaf Hering <olaf@aepfle.de> writes: > > > A few kernel features depend on ms_hyperv.misc_features, but unlike its > > siblings ->features and ->hints, the value was never reported during boot. > > > > Signed-off-by: Olaf Hering <olaf@aepfle.de> > > --- > > arch/x86/kernel/cpu/mshyperv.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c > > index caa032ce3fe3..53706fb56433 100644 > > --- a/arch/x86/kernel/cpu/mshyperv.c > > +++ b/arch/x86/kernel/cpu/mshyperv.c > > @@ -227,8 +227,8 @@ 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("Hyper-V: features 0x%x, hints 0x%x\n", > > - ms_hyperv.features, ms_hyperv.hints); > > + pr_info("Hyper-V: features 0x%x, hints 0x%x, misc 0x%x\n", > > + ms_hyperv.features, ms_hyperv.hints, ms_hyperv.misc_features); > > Several spare thoughts: > > I'm always struggling to remember what is what here as these names don't > correspond to TLFS, could we maybe come up with better naming, e.g. > > "Features.EAX", "Features.EDX", "Recommendations.EAX",... > > On the other hand, there is more, e.g. nested virtualization > features. How is it useful for all users to see this in dmesg every > time? If we need it for development purposes, we can always run 'cpuid' > so maybe let's drop this altogether or print only with pr_debug? > > (Honestly: no strong opinion here, deferring to Microsoft folks). I think making them closer to TLFS is a good idea. Leaving them always printed is not a big concern to me. Sometimes you don't get to run `cpuid` if the kernel crashes early. Olaf's patch is fine as-is. I'm happy to take this patch (if not already taken by x86 maintainers) given it makes at least one developer's life easier. Wei. > > > > > ms_hyperv.max_vp_index = cpuid_eax(HYPERV_CPUID_IMPLEMENT_LIMITS); > > ms_hyperv.max_lp_index = cpuid_ebx(HYPERV_CPUID_IMPLEMENT_LIMITS); > > > > -- > Vitaly > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-09 16:26 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-04-07 17:27 [PATCH v1] x86: hyperv: report value of misc_features Olaf Hering 2020-04-08 15:54 ` Vitaly Kuznetsov 2020-04-09 16:26 ` Wei Liu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).