From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754103AbcKASOx (ORCPT ); Tue, 1 Nov 2016 14:14:53 -0400 Received: from p3plsmtps2ded03.prod.phx3.secureserver.net ([208.109.80.60]:45540 "EHLO p3plsmtps2ded03.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753891AbcKASOh (ORCPT ); Tue, 1 Nov 2016 14:14:37 -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 V2 04/14] Drivers: hv: balloon: Disable hot add when CONFIG_MEMORY_HOTPLUG is not set Date: Tue, 1 Nov 2016 13:07:24 -0700 Message-Id: <1478030854-5970-4-git-send-email-kys@exchange.microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1478030854-5970-1-git-send-email-kys@exchange.microsoft.com> References: <1478030807-5915-1-git-send-email-kys@exchange.microsoft.com> <1478030854-5970-1-git-send-email-kys@exchange.microsoft.com> Reply-To: kys@microsoft.com X-CMAE-Envelope: MS4wfN5AcMVZof+iD1hBHqe1gsYl40Dp3wOfwxD7PF4Ny0axB7LtQV+BzVt39qWws+Q6Wl2WPUb5BFr2jCp5AqF2uzjTxbWZHUqIZkdKVUFRxgb8mAczdcC0 731mghbMK3rQZnuYBOdAUGS8kVQHt7RxJx0bnF1CifLaaaVSd9/+LDStgrtqe5nH5grZxb94kIq95Hj6gqLkqYxC0AwR0wMFoWXL0o3znC3f+QIdX9VaRrDi +HwPZrU/Mu8qSA5IyFTUC9hW8m74XcZZTsXfDpkIOlCGKT0CPMXkrLOGYHHLjAZ0K+IbptKZt1o+fS/BlXqsOdE7VNj4iqGJSahaYmhGwfoaBU6d3lD+5Aho EhA0/+zVxENHJhkpaIEpQn1Z80NLbhjPSxscatt+tFvSqcSna+cvSVaEfSHbAFzdTVd33r9nHVjm2aM8lR5ay8fOfkHSGjgNitvN0MiJiCnIxrWdcutyD+e3 27agm+B5Hm7EhwhNADPnPDIvJTFq6bOvMgJHee90Pv31nH06NRvw87sQl1fB12jC9BN5Z06P0E8biKeL38vZAgC4v+vdJDeuJWy1fQ== 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