linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen/balloon: Support xend-based toolstack
@ 2018-10-07 20:05 Boris Ostrovsky
  2018-10-09 13:58 ` Juergen Gross
  2018-10-10  8:04 ` Juergen Gross
  0 siblings, 2 replies; 3+ messages in thread
From: Boris Ostrovsky @ 2018-10-07 20:05 UTC (permalink / raw)
  To: xen-devel; +Cc: jgross, linux-kernel, Boris Ostrovsky, stable

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
---
 drivers/xen/xen-balloon.c | 13 ++++++++-----
 1 file 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,
 
 	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;
 	}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xen/balloon: Support xend-based toolstack
  2018-10-07 20:05 [PATCH] xen/balloon: Support xend-based toolstack Boris Ostrovsky
@ 2018-10-09 13:58 ` Juergen Gross
  2018-10-10  8:04 ` Juergen Gross
  1 sibling, 0 replies; 3+ messages in thread
From: Juergen Gross @ 2018-10-09 13:58 UTC (permalink / raw)
  To: Boris Ostrovsky, xen-devel; +Cc: linux-kernel, stable

On 07/10/2018 22:05, Boris Ostrovsky wrote:
> 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>


Juergen

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xen/balloon: Support xend-based toolstack
  2018-10-07 20:05 [PATCH] xen/balloon: Support xend-based toolstack Boris Ostrovsky
  2018-10-09 13:58 ` Juergen Gross
@ 2018-10-10  8:04 ` Juergen Gross
  1 sibling, 0 replies; 3+ messages in thread
From: Juergen Gross @ 2018-10-10  8:04 UTC (permalink / raw)
  To: Boris Ostrovsky, xen-devel; +Cc: linux-kernel, stable

On 07/10/2018 22:05, Boris Ostrovsky wrote:
> 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

Committed to xen.tip for-linus-4.20


Juergen

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-10  8:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-07 20:05 [PATCH] xen/balloon: Support xend-based toolstack Boris Ostrovsky
2018-10-09 13:58 ` Juergen Gross
2018-10-10  8:04 ` Juergen Gross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).