From: Alex Ng Date: Sun, 6 Nov 2016 21:14:08 +0000 (-0800) Subject: Drivers: hv: balloon: Disable hot add when CONFIG_MEMORY_HOTPLUG is not set X-Git-Tag: v4.10-rc1~146^2~81 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8ba8c0a111083bfe53f7a8a0e2f14fd12eb2e030;p=karo-tx-linux.git 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 Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman --- 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.