From nobody Wed May 1 15:48:24 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=1579269028; cv=none; d=zohomail.com; s=zohoarc; b=EHfs/Q4t1hjCHCwLEGjFimzoRlwoq7mosPBLyVnmBtEYjG4DclHN9feScp4r12mev5y0So9WjxARa3ea/N8CQCTF/X0Pcjx2+rNTNQDrmOmK3syxgfjBzhjIER5MM8BnJAJBDi6FPCt3bPLbU7kceBOg0mcx0JbwkenZ3t6YC+s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579269028; 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=52IbfJA0COmYhor+aWLlPEBtAlOseUPc8lHXhRahJGg=; b=U6rU4gs4L+f0qUDHWh58iTtyLxm8bPaqJMAOcWun1N/OlGallKth55e/jBoZ+33/a6xzHR4UIfeiwURenKIK4N45lWWvXUOSsvsVU/o2Xhd9eGq91+wpTQtrsf0BSMwvEbgdJ2GfC18ZoQbvOhRnoO1GHcVTEzFvCMnRSsmKaGg= 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 15792690283141009.0680488172609; Fri, 17 Jan 2020 05:50:28 -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 1isS0R-000623-Ap; Fri, 17 Jan 2020 13:49:47 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isS0P-00061x-T7 for xen-devel@lists.xenproject.org; Fri, 17 Jan 2020 13:49:45 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 31657aee-3930-11ea-b833-bc764e2007e4; Fri, 17 Jan 2020 13:49:34 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 56285AAC2; Fri, 17 Jan 2020 13:49:33 +0000 (UTC) X-Inumbo-ID: 31657aee-3930-11ea-b833-bc764e2007e4 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: Fri, 17 Jan 2020 14:49:31 +0100 Message-Id: <20200117134931.16470-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH v2] 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 96edd61dcf4436 ("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: 3aa6c19d2f38be ("xen/balloon: Support xend-based toolstack") Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Cc: # 4.13 --- V2: better commit message --- 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