From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933789AbcJaFtt (ORCPT ); Mon, 31 Oct 2016 01:49:49 -0400 Received: from p3plsmtps2ded01.prod.phx3.secureserver.net ([208.109.80.58]:41708 "EHLO p3plsmtps2ded01.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759041AbcJaFs7 (ORCPT ); Mon, 31 Oct 2016 01:48:59 -0400 x-originating-ip: 72.167.245.219 From: kys@exchange.microsoft.com To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com, jasowang@redhat.com, leann.ogasawara@canonical.com, sthemmin@microsoft.com Cc: Alex Ng , Alex Ng , "K. Y. Srinivasan" Subject: [PATCH 04/15] Drivers: hv: balloon: Disable hot add when CONFIG_MEMORY_HOTPLUG is not set Date: Mon, 31 Oct 2016 00:41:39 -0700 Message-Id: <1477899710-28675-4-git-send-email-kys@exchange.microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1477899710-28675-1-git-send-email-kys@exchange.microsoft.com> References: <1477899668-28635-1-git-send-email-kys@exchange.microsoft.com> <1477899710-28675-1-git-send-email-kys@exchange.microsoft.com> Reply-To: kys@microsoft.com X-CMAE-Envelope: MS4wfOoBE6Kf+u6UIOV3WwBQbJ1C3EsneSBC8gk3KzGgX+/PqWun4GoApn18mOd5vzem9bdUoMGbvp1DpHsiwosUTGjj6DFBy8UMZKLF9pjR3e5RtVut7qpY tvKJGldl1yVmMqvIiKUM5AiBrb3esf3PxmhQ0ltx2pqpmvApoECSSrKDUgsa0hA2Go6zFfvPfCbSfW2AKBYep8olPfXoIjXPyMF18mwrrtnZK8ePx3ivc6Su k46VYWakrdCDgqkJbRaHpBuyeXFff9FdmcPTA7bt5+aqrHW8AJsrwu0qkITEEEqzt6/Ccg9NyRub2KUC6Fo7rGXH/7KXpyOAddV3AhsKaaBoXI574gQW4QVe 82aJS5KlgyLfqJmqRmx2i/CJOwaPZmoUOBxY94upadaMBX/4rCcjvHGtUg96OnXPW5l6OtQ0ej8lbJwV7QHPbqu9SDIdEvQmJ1syHxjy64Af5P9RnwQgiMWy dgVUcSfkqGka3hgmSytczml1YJGdQmsJ22fRmecoyux/QkCFioD4zV/4FxfL0DS2saWyGFhM3X6lR+bMQsyz8l3LM15cWbMcAPHSFQ== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alex Ng If the guest does not support memory hotplugging, it should respond to the host with zero pages added and successful result code. This signals to the host that hotplugging is not supported and the host will avoid sending future hot-add requests. Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_balloon.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index fdf8da9..8f932aa 100644 --- a/drivers/hv/hv_balloon.c +++ b/drivers/hv/hv_balloon.c @@ -1501,7 +1501,11 @@ static int balloon_probe(struct hv_device *dev, struct dm_version_request version_req; struct dm_capabilities cap_msg; +#ifdef CONFIG_MEMORY_HOTPLUG do_hot_add = hot_add; +#else + do_hot_add = false; +#endif /* * First allocate a send buffer. -- 1.7.4.1