Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2839823imm; Sun, 7 Oct 2018 13:06:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV63kEhhN/KX+LIk0HfBec/G9DbZgrswT+MW1IKsViQiLRIYvgXhGTefPi2Q4Xht0Wz10iRcx X-Received: by 2002:a63:66c3:: with SMTP id a186-v6mr18459295pgc.330.1538942813956; Sun, 07 Oct 2018 13:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538942813; cv=none; d=google.com; s=arc-20160816; b=ZxkWapv5tAT4d9pXA+i40zJys22QLqh2f/ZuFm4puVDlD1QSXSMlLEWMi3wOBCVu6r EcAI75gnoxpHpiut4StNGINV3yu8gVz0VgjYeJ4+i+wQCxaZUUz0FRRO5EqIFXPdB0e/ awI+///4OaJtU2f6HsuIWO7dIW0PjDVvcIp3mh6/CgUWAd2T1DOPn6WqWLuNkl2XF6jL 66epYAS92byWwixB7xR+gd8Vkebx5wkNdUIFRnK5CRB4a+IhRNseabu6Oc0rDT3DR/bz MLUzOxRv5HtjrR2RA/0pY3ObZsFbHnaMsNvz/mKTe1dD1Z+rw4koPW9zmXPx4m6SGv4P R/og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=7pw3/7kwCmkhEsuBc97OJ7wZGfIYv641kGtb5eDPPjk=; b=yDR5PiLLskIiPwT6y1RJ2pkCr/vEw1pwDBUV7mo9uoQ/NOfsg+ouNljApgTzQOLnFC gXA8C/zjRR28P5PV2sEQ5fJcxMBcB8t+++d3kVIo5CEoS4bTD3GYkH50ooHeKaU8sLxW o0d5wZAzK1laSWPpVcPRtV9SscB78l9xI0YY1lGcTSaP8uXp7ltUedQm1cRjqpeA557k loLBsH4uRSs3AterQGcjeo3/4ePRQJIF3Y69KpiqdIwhUU2E15PJ5KQ33bQzLeLiaCJb 7Ej70rlpRjjzZm+O8EzFrT5wfudw7ZMFJevE2T20rU9KyoQPTgtcWU2hxtCKtmFLnuvi 8hiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=fKDyTISD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y129-v6si14064837pgy.551.2018.10.07.13.06.37; Sun, 07 Oct 2018 13:06:53 -0700 (PDT) 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=@oracle.com header.s=corp-2018-07-02 header.b=fKDyTISD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727982AbeJHDO5 (ORCPT + 99 others); Sun, 7 Oct 2018 23:14:57 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:41256 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726503AbeJHDO5 (ORCPT ); Sun, 7 Oct 2018 23:14:57 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w97K6TBo083366; Sun, 7 Oct 2018 20:06:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2018-07-02; bh=7pw3/7kwCmkhEsuBc97OJ7wZGfIYv641kGtb5eDPPjk=; b=fKDyTISDvRoN8NCIukfNJg/HBL0QPEOicXFZO113EM9lKXTw6Y99qQ6Xkr/0738Om+cb LSF5Tv76/bOb+UGYZki5PJnjsRR2UztOcDTd5cDXvh/ZULboasdLT8KP1ndsgVUruo0b gSMICnm0+WkgmtmbWog+kHhsKal9gJYuwta6DPXMvyqq28+hJCjUCcUvw6wu4ibZVSag Ti4OeSeiRYmrDJ0YiyQuJVkFJhWtEnWowF3DU73ckIHXN9pjEN/fFFrArw1gow4N8+WJ HdwWXeRPo04ggl85LpkQg+rM6mJk2EkP+0rRmnOTmFFZ6qf9kSXf1QP0uhpbFSlFrSaK aQ== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2mxmftbaxv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 07 Oct 2018 20:06:29 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w97K6SIj021501 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 7 Oct 2018 20:06:29 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w97K6S0w023819; Sun, 7 Oct 2018 20:06:28 GMT Received: from dhcp-burlington7-2nd-B-east-10-152-55-162.usdhcp.oraclecorp.com.com (/10.152.32.65) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 07 Oct 2018 20:06:28 +0000 From: Boris Ostrovsky To: xen-devel@lists.xenproject.org Cc: jgross@suse.com, linux-kernel@vger.kernel.org, Boris Ostrovsky , stable@vger.kernel.org Subject: [PATCH] xen/balloon: Support xend-based toolstack Date: Sun, 7 Oct 2018 16:05:38 -0400 Message-Id: <20181007200538.19320-1-boris.ostrovsky@oracle.com> X-Mailer: git-send-email 2.17.1 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9039 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=964 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810070205 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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