linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: hyperv: make the format of 'Hyper-V: Host Build' output match x86
@ 2022-03-04 12:24 Vitaly Kuznetsov
  2022-03-04 18:22 ` Michael Kelley (LINUX)
  0 siblings, 1 reply; 3+ messages in thread
From: Vitaly Kuznetsov @ 2022-03-04 12:24 UTC (permalink / raw)
  To: linux-hyperv
  Cc: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu,
	Dexuan Cui, Michael Kelley, linux-arm-kernel, Catalin Marinas,
	Will Deacon, linux-kernel

Currently, the following is observed on Hyper-V/ARM:

 Hyper-V: Host Build 10.0.22477.1061-1-0

This differs from similar output on x86:

 Hyper-V Host Build:20348-10.0-1-0.1138

and this is inconvenient. As x86 was the first to introduce the current
format and to not break existing tools parsing it, change the format on
ARM to match.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
 arch/arm64/hyperv/mshyperv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/hyperv/mshyperv.c b/arch/arm64/hyperv/mshyperv.c
index bbbe351e9045..7b9c1c542a77 100644
--- a/arch/arm64/hyperv/mshyperv.c
+++ b/arch/arm64/hyperv/mshyperv.c
@@ -60,8 +60,8 @@ static int __init hyperv_init(void)
 	b = result.as32.b;
 	c = result.as32.c;
 	d = result.as32.d;
-	pr_info("Hyper-V: Host Build %d.%d.%d.%d-%d-%d\n",
-		b >> 16, b & 0xFFFF, a,	d & 0xFFFFFF, c, d >> 24);
+	pr_info("Hyper-V Host Build:%d-%d.%d-%d-%d.%d\n",
+		a, b >> 16, b & 0xFFFF, c, d >> 24, d & 0xFFFFFF);
 
 	ret = hv_common_init();
 	if (ret)
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] arm64: hyperv: make the format of 'Hyper-V: Host Build' output match x86
  2022-03-04 12:24 [PATCH] arm64: hyperv: make the format of 'Hyper-V: Host Build' output match x86 Vitaly Kuznetsov
@ 2022-03-04 18:22 ` Michael Kelley (LINUX)
  2022-03-06 10:51   ` Vitaly Kuznetsov
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Kelley (LINUX) @ 2022-03-04 18:22 UTC (permalink / raw)
  To: vkuznets, linux-hyperv
  Cc: KY Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu,
	Dexuan Cui, linux-arm-kernel, Catalin Marinas, Will Deacon,
	linux-kernel

From: Vitaly Kuznetsov <vkuznets@redhat.com> Sent: Friday, March 4, 2022 4:24 AM
> 
> Currently, the following is observed on Hyper-V/ARM:
> 
>  Hyper-V: Host Build 10.0.22477.1061-1-0
> 
> This differs from similar output on x86:
> 
>  Hyper-V Host Build:20348-10.0-1-0.1138
> 
> and this is inconvenient. As x86 was the first to introduce the current
> format and to not break existing tools parsing it, change the format on
> ARM to match.

Interesting.  I had explicitly output this line differently on ARM64 so
that the output is in the standard form of a Windows version number,
which is what the Host Build value actually is.  My intent is to fix the
x86 side as well.  I had not anticipated there being automated parsing
of these strings.

I had also put the colon in the place to be consistent with most
other Hyper-V messages.  I know:  picky, picky. :-)

What's the impact of changing the tools that parse it so that
either version could be handled?

Michael

> 
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
>  arch/arm64/hyperv/mshyperv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/hyperv/mshyperv.c b/arch/arm64/hyperv/mshyperv.c
> index bbbe351e9045..7b9c1c542a77 100644
> --- a/arch/arm64/hyperv/mshyperv.c
> +++ b/arch/arm64/hyperv/mshyperv.c
> @@ -60,8 +60,8 @@ static int __init hyperv_init(void)
>  	b = result.as32.b;
>  	c = result.as32.c;
>  	d = result.as32.d;
> -	pr_info("Hyper-V: Host Build %d.%d.%d.%d-%d-%d\n",
> -		b >> 16, b & 0xFFFF, a,	d & 0xFFFFFF, c, d >> 24);
> +	pr_info("Hyper-V Host Build:%d-%d.%d-%d-%d.%d\n",
> +		a, b >> 16, b & 0xFFFF, c, d >> 24, d & 0xFFFFFF);
> 
>  	ret = hv_common_init();
>  	if (ret)
> --
> 2.35.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] arm64: hyperv: make the format of 'Hyper-V: Host Build' output match x86
  2022-03-04 18:22 ` Michael Kelley (LINUX)
@ 2022-03-06 10:51   ` Vitaly Kuznetsov
  0 siblings, 0 replies; 3+ messages in thread
From: Vitaly Kuznetsov @ 2022-03-06 10:51 UTC (permalink / raw)
  To: Michael Kelley (LINUX), linux-hyperv
  Cc: KY Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu,
	Dexuan Cui, linux-arm-kernel, Catalin Marinas, Will Deacon,
	linux-kernel

"Michael Kelley (LINUX)" <mikelley@microsoft.com> writes:

> From: Vitaly Kuznetsov <vkuznets@redhat.com> Sent: Friday, March 4, 2022 4:24 AM
>> 
>> Currently, the following is observed on Hyper-V/ARM:
>> 
>>  Hyper-V: Host Build 10.0.22477.1061-1-0
>> 
>> This differs from similar output on x86:
>> 
>>  Hyper-V Host Build:20348-10.0-1-0.1138
>> 
>> and this is inconvenient. As x86 was the first to introduce the current
>> format and to not break existing tools parsing it, change the format on
>> ARM to match.
>
> Interesting.  I had explicitly output this line differently on ARM64 so
> that the output is in the standard form of a Windows version number,
> which is what the Host Build value actually is.  My intent is to fix the
> x86 side as well.  I had not anticipated there being automated parsing
> of these strings.
>
> I had also put the colon in the place to be consistent with most
> other Hyper-V messages.  I know:  picky, picky. :-)
>
> What's the impact of changing the tools that parse it so that
> either version could be handled?

I wish we knew what tools are out there parsing this line :-) The issue
got reported by QA as 'inconsistency'.

As the format of this string was never promissed to be an ABI I think we
can go the other way around: change x86 to match ARM. Some scripts may
need fixing but IMO this is acceptable. Let's just promiss to not change
it in the future :-)

-- 
Vitaly


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-06 10:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 12:24 [PATCH] arm64: hyperv: make the format of 'Hyper-V: Host Build' output match x86 Vitaly Kuznetsov
2022-03-04 18:22 ` Michael Kelley (LINUX)
2022-03-06 10:51   ` Vitaly Kuznetsov

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).