diff options
| author | Boris Ostrovsky <boris.ostrovsky@oracle.com> | 2018-10-07 16:05:38 -0400 |
|---|---|---|
| committer | Juergen Gross <jgross@suse.com> | 2018-10-24 04:18:47 -0400 |
| commit | 3aa6c19d2f38be9c6e9a8ad5fa8e3c9d29ee3c35 (patch) | |
| tree | ef27273d532d5fe9bf8c947dc4decaa5cb4f18cb /drivers/xen | |
| parent | 7deecbda3026f5e2a8cc095d7ef7261a920efcf2 (diff) | |
xen/balloon: Support xend-based toolstack
Xend-based toolstacks don't have static-max entry in xenstore. The
equivalent node for those toolstacks is memory_static_max.
Fixes: 5266b8e4445c (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>
Diffstat (limited to 'drivers/xen')
| -rw-r--r-- | drivers/xen/xen-balloon.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/xen/xen-balloon.c b/drivers/xen/xen-balloon.c index 63c1494a8d73..2acbfe104e46 100644 --- a/drivers/xen/xen-balloon.c +++ b/drivers/xen/xen-balloon.c | |||
| @@ -76,12 +76,15 @@ static void watch_target(struct xenbus_watch *watch, | |||
| 76 | 76 | ||
| 77 | if (!watch_fired) { | 77 | if (!watch_fired) { |
| 78 | watch_fired = true; | 78 | watch_fired = true; |
| 79 | err = xenbus_scanf(XBT_NIL, "memory", "static-max", "%llu", | 79 | |
| 80 | &static_max); | 80 | if ((xenbus_scanf(XBT_NIL, "memory", "static-max", |
| 81 | if (err != 1) | 81 | "%llu", &static_max) == 1) || |
| 82 | static_max = new_target; | 82 | (xenbus_scanf(XBT_NIL, "memory", "memory_static_max", |
| 83 | else | 83 | "%llu", &static_max) == 1)) |
| 84 | static_max >>= PAGE_SHIFT - 10; | 84 | static_max >>= PAGE_SHIFT - 10; |
| 85 | else | ||
| 86 | static_max = new_target; | ||
| 87 | |||
| 85 | target_diff = (xen_pv_domain() || xen_initial_domain()) ? 0 | 88 | target_diff = (xen_pv_domain() || xen_initial_domain()) ? 0 |
| 86 | : static_max - balloon_stats.target_pages; | 89 | : static_max - balloon_stats.target_pages; |
| 87 | } | 90 | } |
