summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Ng <alexng@messages.microsoft.com>2016-11-06 13:14:08 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-07 10:01:17 +0100
commit8ba8c0a111083bfe53f7a8a0e2f14fd12eb2e030 (patch)
treea2505bd855e49a56c3649e4104683740daad66e7
parent3da0401b4d0e17aea7526db0235d98fa535d903e (diff)
downloadlinux-8ba8c0a111083bfe53f7a8a0e2f14fd12eb2e030.tar.gz
linux-8ba8c0a111083bfe53f7a8a0e2f14fd12eb2e030.tar.bz2
linux-8ba8c0a111083bfe53f7a8a0e2f14fd12eb2e030.zip
Drivers: hv: balloon: Disable hot add when CONFIG_MEMORY_HOTPLUG is not set
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 <alexng@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/hv/hv_balloon.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
index fdf8da929cbe..8f932aada3eb 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.