Drivers: hv: balloon: Disable hot add when CONFIG_MEMORY_HOTPLUG is not set
authorAlex Ng <alexng@messages.microsoft.com>
Sun, 6 Nov 2016 21:14:08 +0000 (13:14 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Nov 2016 09:01:17 +0000 (10:01 +0100)
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>
drivers/hv/hv_balloon.c

index fdf8da929cbea6f3962f19b1ccc6110de22b1adc..8f932aada3eb69a67f46ead1515b24648a5300fc 100644 (file)
@@ -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.