X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=drivers%2Fxen%2Fxen-balloon.c;h=a67236b024522732a2e7cc8e9861ad9c46c87141;hb=d14d7f14f177834788a276fc7b1317b539cedca2;hp=2acbfe104e464ab0d8e59bb5ff1862ce08411ed0;hpb=a422757e8c323ae12163fa74bc21c41606a233df;p=sfrench%2Fcifs-2.6.git diff --git a/drivers/xen/xen-balloon.c b/drivers/xen/xen-balloon.c index 2acbfe104e46..a67236b02452 100644 --- a/drivers/xen/xen-balloon.c +++ b/drivers/xen/xen-balloon.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -50,6 +51,10 @@ #define BALLOON_CLASS_NAME "xen_memory" +#ifdef CONFIG_MEMORY_HOTPLUG +u64 xen_saved_max_mem_size = 0; +#endif + static struct device balloon_dev; static int register_balloon(struct device *dev); @@ -63,6 +68,12 @@ static void watch_target(struct xenbus_watch *watch, static bool watch_fired; static long target_diff; +#ifdef CONFIG_MEMORY_HOTPLUG + /* The balloon driver will take care of adding memory now. */ + if (xen_saved_max_mem_size) + max_mem_size = xen_saved_max_mem_size; +#endif + err = xenbus_scanf(XBT_NIL, "memory", "target", "%llu", &new_target); if (err != 1) { /* This is ok (for domain0 at least) - so just return */