git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'for-linus-5.1a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git]
/
drivers
/
xen
/
xen-balloon.c
diff --git
a/drivers/xen/xen-balloon.c
b/drivers/xen/xen-balloon.c
index 2acbfe104e464ab0d8e59bb5ff1862ce08411ed0..a67236b024522732a2e7cc8e9861ad9c46c87141 100644
(file)
--- a/
drivers/xen/xen-balloon.c
+++ b/
drivers/xen/xen-balloon.c
@@
-37,6
+37,7
@@
#include <linux/mm_types.h>
#include <linux/init.h>
#include <linux/capability.h>
#include <linux/mm_types.h>
#include <linux/init.h>
#include <linux/capability.h>
+#include <linux/memory_hotplug.h>
#include <xen/xen.h>
#include <xen/interface/xen.h>
#include <xen/xen.h>
#include <xen/interface/xen.h>
@@
-50,6
+51,10
@@
#define BALLOON_CLASS_NAME "xen_memory"
#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);
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;
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 */
err = xenbus_scanf(XBT_NIL, "memory", "target", "%llu", &new_target);
if (err != 1) {
/* This is ok (for domain0 at least) - so just return */