From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423240AbcBZVfg (ORCPT ); Fri, 26 Feb 2016 16:35:36 -0500 Received: from p3plsmtps2ded01.prod.phx3.secureserver.net ([208.109.80.58]:54014 "EHLO p3plsmtps2ded01.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755454AbcBZVfG (ORCPT ); Fri, 26 Feb 2016 16:35:06 -0500 x-originating-ip: 72.167.245.219 From: "K. Y. Srinivasan" To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com, jasowang@redhat.com Cc: Alex Ng , "K. Y. Srinivasan" Subject: [PATCH 8/8] Drivers: hv: vmbus: Support kexec on ws2012 r2 and above Date: Fri, 26 Feb 2016 15:13:22 -0800 Message-Id: <1456528402-21982-8-git-send-email-kys@microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1456528402-21982-1-git-send-email-kys@microsoft.com> References: <1456528381-21943-1-git-send-email-kys@microsoft.com> <1456528402-21982-1-git-send-email-kys@microsoft.com> X-CMAE-Envelope: MS4wfCPtwJSyjDQQuOls0f4n99U3a7R7o7jXL7WnEfMZDo8dO/oSM56g/1gg4qe2L+eokbUFHLVwJaQtiL6cgDbM9Hparg6/HQjEyQB7b5ltkWuALuWxLdc+ 2oLucegHqXQcfABUUTbMptIGJdzTWFj/Agl+09tyIk1fGXjLIJI4MRMwgYirkNuCKjliaGghJEO/bXAI7mGEhZ46sYOtP1br7o1/uH1e7scFRmaMZZTKix3R RtaFPwP7swKe25regh3+CndAvAz8hEnGU56ouzIZd6zeuixDPSqk29Q85elWCa2ke3P4eux9kpbmijwaucuPSBCQh83U1abY1sig7GpxaK1riAd7cYqAUYgb eUFvbK439qhqJrZEltieKPqJWQBz9jvCh3Oi2AGAuEegzQZmIaSMQpUznfFnG8SVzwmHVPWlxptwK5BOU5EpjdhmeR+DBw== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alex Ng 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 Signed-off-by: K. Y. Srinivasan --- 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 3b6dc00..d02f137 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 -- 1.7.4.1