From nobody Sat May 18 23:23:51 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1579194077; cv=none; d=zohomail.com; s=zohoarc; b=QmdkoopOathnjmHHNjpHZ6ouCWuIhfhZS744UebQi2usXcj696bjE+CIylUysHLf9EPgFh5M3X7MxUOFC+vNQRKtnR6LRSEJrFHyw4LD5HfUFo/BWojAAUFjP7KUJfjh5wTZ0eRrRJq8t33ShLcP/rl1aC3XKycgR4xjzv7Bq+c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579194077; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=arBo5FneQG3muRNrpGd+bjPiGBbVrH6mPtlUmphtMxM=; b=Pupwu9WgYoR9njokn742k9w3PkjOdzIv7UoAGk3WwUJjyYxsiWufGAsbkyiLc3qi1knsnUTkVVFuUfMDZVD0YxEoXvOLsHA6zq8sKiCF8bon8QdAOjfw5rZX3RqstERR1JXZP8rYiy6S+3iFH71lG23d8Yrdrl3u5h1Wjxao+Ss= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1579194077456487.47167519789195; Thu, 16 Jan 2020 09:01:17 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1is8VB-0006S0-0q; Thu, 16 Jan 2020 17:00:13 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1is8VA-0006Rs-6g for xen-devel@lists.xenproject.org; Thu, 16 Jan 2020 17:00:12 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id a5e1998f-3881-11ea-8781-12813bfff9fa; Thu, 16 Jan 2020 17:00:08 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7A0E7B2EDC; Thu, 16 Jan 2020 17:00:07 +0000 (UTC) X-Inumbo-ID: a5e1998f-3881-11ea-8781-12813bfff9fa X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Date: Thu, 16 Jan 2020 18:00:04 +0100 Message-Id: <20200116170004.14373-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH] xen/balloon: Support xend-based toolstack take two X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Boris Ostrovsky , Stefano Stabellini , stable@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Commit 3aa6c19d2f38be ("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 5266b8e4445c ("xen: fix booting ballooned down hvm guest") in case the static memory maximum can't be read. Fixes: 3aa6c19d2f38be ("xen/balloon: Support xend-based toolstack") Signed-off-by: Juergen Gross Cc: # 4.13 Reviewed-by: Boris Ostrovsky --- drivers/xen/xen-balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/xen-balloon.c b/drivers/xen/xen-balloon.c index 6d12fc368210..a8d24433c8e9 100644 --- a/drivers/xen/xen-balloon.c +++ b/drivers/xen/xen-balloon.c @@ -94,7 +94,7 @@ static void watch_target(struct xenbus_watch *watch, "%llu", &static_max) =3D=3D 1)) static_max >>=3D PAGE_SHIFT - 10; else - static_max =3D new_target; + static_max =3D balloon_stats.current_pages; =20 target_diff =3D (xen_pv_domain() || xen_initial_domain()) ? 0 : static_max - balloon_stats.target_pages; --=20 2.16.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel