Skip to content

Commit eda4eab

Browse files
jgross1bostrovs
authored andcommitted
xen/balloon: Support xend-based toolstack take two
Commit 3aa6c19 ("xen/balloon: Support xend-based toolstack") tried to fix a regression with running on rather ancient Xen versions. Unfortunately the fix was based on the assumption that xend would just use another Xenstore node, but in reality only some downstream versions of xend are doing that. The upstream xend does not write that Xenstore node at all, so the problem must be fixed in another way. The easiest way to achieve that is to fall back to the behavior before commit 96edd61 ("xen/balloon: don't online new memory initially") in case the static memory maximum can't be read. This is achieved by setting static_max to the current number of memory pages known by the system resulting in target_diff becoming zero. Fixes: 3aa6c19 ("xen/balloon: Support xend-based toolstack") Signed-off-by: Juergen Gross <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Cc: <[email protected]> # 4.13 Signed-off-by: Boris Ostrovsky <[email protected]>
1 parent 476878e commit eda4eab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/xen/xen-balloon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static void watch_target(struct xenbus_watch *watch,
9494
"%llu", &static_max) == 1))
9595
static_max >>= PAGE_SHIFT - 10;
9696
else
97-
static_max = new_target;
97+
static_max = balloon_stats.current_pages;
9898

9999
target_diff = (xen_pv_domain() || xen_initial_domain()) ? 0
100100
: static_max - balloon_stats.target_pages;

0 commit comments

Comments
 (0)