diff options
author | Alex Ng <alexng@microsoft.com> | 2016-02-27 00:13:22 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-02 01:57:20 +0100 |
commit | 7268644734f6a300353a4c4ff8bf3e013ba80f89 (patch) | |
tree | bfac2a165f0f2543a89076aadc70811e14212782 /drivers/hv/connection.c | |
parent | Drivers: hv: vmbus: Support handling messages on multiple CPUs (diff) | |
download | linux-7268644734f6a300353a4c4ff8bf3e013ba80f89.tar.xz linux-7268644734f6a300353a4c4ff8bf3e013ba80f89.zip |
Drivers: hv: vmbus: Support kexec on ws2012 r2 and above
WS2012 R2 and above hosts can support kexec in that thay can support
reconnecting to the host (as would be needed in the kexec path)
on any CPU. Enable this. Pre ws2012 r2 hosts don't have this ability
and consequently cannot support kexec.
Signed-off-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/connection.c')
-rw-r--r-- | drivers/hv/connection.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index 3b6dc0017269..d02f1373dd98 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -88,8 +88,16 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, * This has been the behavior pre-win8. This is not * perf issue and having all channel messages delivered on CPU 0 * would be ok. + * For post win8 hosts, we support receiving channel messagges on + * all the CPUs. This is needed for kexec to work correctly where + * the CPU attempting to connect may not be CPU 0. */ - msg->target_vcpu = 0; + if (version >= VERSION_WIN8_1) { + msg->target_vcpu = hv_context.vp_index[get_cpu()]; + put_cpu(); + } else { + msg->target_vcpu = 0; + } /* * Add to list before we send the request since we may |