diff options
author | Andrea Parri <parri.andrea@gmail.com> | 2019-10-15 14:46:45 +0300 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2019-11-22 04:10:43 +0300 |
commit | 2d4f49b3e1e3a24ce16dfeeb2235688c8aba57ef (patch) | |
tree | 91ebb5ff8a1000b4d50a2aa138dc12a79389971f /drivers/hv/connection.c | |
parent | bedc61a922f9dbbe3bfb26ec2745f8cd63b57637 (diff) | |
download | linux-2d4f49b3e1e3a24ce16dfeeb2235688c8aba57ef.tar.xz |
Drivers: hv: vmbus: Enable VMBus protocol versions 4.1, 5.1 and 5.2
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@gmail.com>
Reviewed-by: Wei Liu <wei.liu@kernel.org>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/hv/connection.c')
-rw-r--r-- | drivers/hv/connection.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index 8dc48f53c1ac..cadfb34b38d8 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -44,7 +44,10 @@ EXPORT_SYMBOL_GPL(vmbus_proto_version); * Table of VMBus versions listed from newest to oldest. */ static __u32 vmbus_versions[] = { + VERSION_WIN10_V5_2, + VERSION_WIN10_V5_1, VERSION_WIN10_V5, + VERSION_WIN10_V4_1, VERSION_WIN10, VERSION_WIN8_1, VERSION_WIN8, @@ -68,12 +71,12 @@ int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, u32 version) msg->vmbus_version_requested = version; /* - * VMBus protocol 5.0 (VERSION_WIN10_V5) requires that we must use - * VMBUS_MESSAGE_CONNECTION_ID_4 for the Initiate Contact Message, + * VMBus protocol 5.0 (VERSION_WIN10_V5) and higher require that we must + * use VMBUS_MESSAGE_CONNECTION_ID_4 for the Initiate Contact Message, * and for subsequent messages, we must use the Message Connection ID * field in the host-returned Version Response Message. And, with - * VERSION_WIN10_V5, we don't use msg->interrupt_page, but we tell - * the host explicitly that we still use VMBUS_MESSAGE_SINT(2) for + * VERSION_WIN10_V5 and higher, we don't use msg->interrupt_page, but we + * tell the host explicitly that we still use VMBUS_MESSAGE_SINT(2) for * compatibility. * * On old hosts, we should always use VMBUS_MESSAGE_CONNECTION_ID (1). @@ -399,7 +402,7 @@ int vmbus_post_msg(void *buffer, size_t buflen, bool can_sleep) case HV_STATUS_INVALID_CONNECTION_ID: /* * See vmbus_negotiate_version(): VMBus protocol 5.0 - * requires that we must use + * and higher require that we must use * VMBUS_MESSAGE_CONNECTION_ID_4 for the Initiate * Contact message, but on old hosts that only * support VMBus protocol 4.0 or lower, here we get |