mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
xen/balloon: Support xend-based toolstack
commit3aa6c19d2fupstream. Xend-based toolstacks don't have static-max entry in xenstore. The equivalent node for those toolstacks is memory_static_max. Fixes:5266b8e444(xen: fix booting ballooned down hvm guest) Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: <stable@vger.kernel.org> # 4.13 Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a49e27c0ef
commit
726a8d0ae0
@@ -75,12 +75,15 @@ static void watch_target(struct xenbus_watch *watch,
|
||||
|
||||
if (!watch_fired) {
|
||||
watch_fired = true;
|
||||
err = xenbus_scanf(XBT_NIL, "memory", "static-max", "%llu",
|
||||
&static_max);
|
||||
if (err != 1)
|
||||
static_max = new_target;
|
||||
else
|
||||
|
||||
if ((xenbus_scanf(XBT_NIL, "memory", "static-max",
|
||||
"%llu", &static_max) == 1) ||
|
||||
(xenbus_scanf(XBT_NIL, "memory", "memory_static_max",
|
||||
"%llu", &static_max) == 1))
|
||||
static_max >>= PAGE_SHIFT - 10;
|
||||
else
|
||||
static_max = new_target;
|
||||
|
||||
target_diff = (xen_pv_domain() || xen_initial_domain()) ? 0
|
||||
: static_max - balloon_stats.target_pages;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user