Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3432784imu; Sun, 11 Nov 2018 15:00:27 -0800 (PST) X-Google-Smtp-Source: AJdET5f1FrrKnAl+Nz+v2K3f+I/BLH6TQ7pw4WRVdW28pysDiwm3hOo+EX3nCMdiW96BnEqFX9Eg X-Received: by 2002:a62:89d7:: with SMTP id n84-v6mr18069026pfk.255.1541977227530; Sun, 11 Nov 2018 15:00:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977227; cv=none; d=google.com; s=arc-20160816; b=KOWHN6k/9ANi2/cynV3CGHxbEX2eBedVzg0Kq0sPJ/uCu2JWr/yts5HbzUrWRHafOL VrYfytmU/LPUJFK1Y79I9pt0yvnjQ71NUdXaiS5bT3PNFQfM8iK8/yyLuQEe8LISkHLi NdGIX5AlYZ64lHoLO9YhI8DHEdGL6VibR/0VrJItjJc5c7kvC4LlxWwrdPPY4ziiIAUi NGYaITOTwb2WQcNHbBSKHPiZpc8/W1OeLgNnRV9X3hNFcJVOhjij/35Ks6khbbEAZhr+ SeUEsxV9eOha8OWQlWdYnV+B2MiciqYaIiPQ9gtqE00zwVIe2whMnXiq+gLGAqFZq+yl AIyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+oG4LXM7yusv7SHo2BYXKvzcIa8gmZmW/desKZ3PpdE=; b=xaoEjiS42iY6COzXJmbBTtlx1nwhxFsR/Zo9ERVVLhDBhM1xAUlE00jfTgvjdAUGVz AlLOf3Q7D3t57JODgZ57G1V1kh5G/ojsCnJ+YCPvFceKA0bu86pF5bPJtEjApS+xoO58 Ua/t8Yvlqn73qhqzNOTMOX4xuQRdqwNrbt9pqlPyVMcxyQ9NKbq6ls/Fal2ym8LBtKz/ pREf5vlPvFvQMZAzFGlVeuGX9v+6TgX/IIcZrQQ321ysmVwQXNKhSn25OGPEvNU/xRiC Mnsw0eOvCfLwRWWul4zXNTIKyi4oDpS36l5MXOl9hWPTgxhILaRg4uJlesAgwl8OJRo+ Qy6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Hy6exHjC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u6si14250737pgl.561.2018.11.11.15.00.12; Sun, 11 Nov 2018 15:00:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Hy6exHjC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390815AbeKLIt4 (ORCPT + 99 others); Mon, 12 Nov 2018 03:49:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:52394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390758AbeKLIWh (ORCPT ); Mon, 12 Nov 2018 03:22:37 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EEEB6223D8; Sun, 11 Nov 2018 22:32:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975560; bh=ISyLzg5mLhtJo5BRc+RAvFW1dOV6cnQWISZWVbfs7Cw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hy6exHjCIqInjsQqVyPOqUdk2SS0Zdc+15sAFt/TUwpNCUqg6QoCuY9FDz8gdY3wb 2494udNjnjiOD7UJs+AY107F2oR8ZJAAjHTKh1QduLNJ7dWVUh+XAhel8tvQj27FnU 2iSi1hLulKiqRPL6Z/XzsAl/doeNFjW8FfrwzY20= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Boris Ostrovsky , Juergen Gross Subject: [PATCH 4.14 119/222] xen/balloon: Support xend-based toolstack Date: Sun, 11 Nov 2018 14:23:36 -0800 Message-Id: <20181111221658.366872342@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Boris Ostrovsky commit 3aa6c19d2f38be9c6e9a8ad5fa8e3c9d29ee3c35 upstream. 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 Cc: # 4.13 Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross Signed-off-by: Greg Kroah-Hartman --- drivers/xen/xen-balloon.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) --- a/drivers/xen/xen-balloon.c +++ b/drivers/xen/xen-balloon.c @@ -75,12 +75,15 @@ static void watch_target(struct xenbus_w 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; }