RE: [PATCH v2 2/3] Drivers: hv: vmbus: Enable VMBus protocol versions 4.1, 5.1 and 5.2

From: Michael Kelley
Date: Sat Oct 12 2019 - 09:34:48 EST


From: Andrea Parri <parri.andrea@xxxxxxxxx> Sent: Thursday, October 10, 2019 8:46 AM
>
> Hyper-V has added VMBus protocol versions 5.1 and 5.2 in recent release
> versions. Allow Linux guests to negotiate these new protocol versions
> on versions of Hyper-V that support them. While on this, also allow
> guests to negotiate the VMBus protocol version 4.1 (which was missing).
>
> Signed-off-by: Andrea Parri <parri.andrea@xxxxxxxxx>
> ---
> drivers/hv/connection.c | 15 +++++++++------
> drivers/net/hyperv/netvsc.c | 6 +++---
> include/linux/hyperv.h | 8 +++++++-
> net/vmw_vsock/hyperv_transport.c | 4 ++--
> 4 files changed, 21 insertions(+), 12 deletions(-)
>
> diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
> index c08b62dbd151f..a4f80e30b0207 100644
> --- a/include/linux/hyperv.h
> +++ b/include/linux/hyperv.h
> @@ -182,15 +182,21 @@ static inline u32 hv_get_avail_to_write_percent(
> * 2 . 4 (Windows 8)
> * 3 . 0 (Windows 8 R2)
> * 4 . 0 (Windows 10)
> + * 4 . 1 (Windows 10 RS3)
> * 5 . 0 (Newer Windows 10)
> + * 5 . 1 (Windows 10 RS4)
> + * 5 . 2 (Windows Server 2019, RS5)
> */
>
> #define VERSION_WS2008 ((0 << 16) | (13))
> #define VERSION_WIN7 ((1 << 16) | (1))
> #define VERSION_WIN8 ((2 << 16) | (4))
> #define VERSION_WIN8_1 ((3 << 16) | (0))
> -#define VERSION_WIN10 ((4 << 16) | (0))
> +#define VERSION_WIN10_V4 ((4 << 16) | (0))

I would recommend not changing the symbol name for version 4.0.
The change makes it more consistent with the later VERSION_WIN10_*
symbols, but it doesn't fundamentally add any clarity and I'm not sure
it's worth the churn in the other files that have to be touched. It's a
judgment call, and that's just my input.

> +#define VERSION_WIN10_V4_1 ((4 << 16) | (1))
> #define VERSION_WIN10_V5 ((5 << 16) | (0))
> +#define VERSION_WIN10_V5_1 ((5 << 16) | (1))
> +#define VERSION_WIN10_V5_2 ((5 << 16) | (2))
>

Michael