Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3492629pxf; Mon, 29 Mar 2021 03:55:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz14KVm7J75Q98elSYcam0FWjlicVQcaFwL6Go5uSCuwJKJNG9qpC5yC+ca06PoiXu5MhVg X-Received: by 2002:aa7:db95:: with SMTP id u21mr27753349edt.152.1617015323908; Mon, 29 Mar 2021 03:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617015323; cv=none; d=google.com; s=arc-20160816; b=woBh7DMH35FcdMDHFYIk92UJytP+76o6ypc8X5KUyci6DCMeQdxtB9MacFKa2t6F59 mEGEdpujY+0/9afJzqlBjuXFiJOMZEJ4ZfpwzSoZipi6vdXgGxPNr0DVOYtTlSCFMXdV F9hwf+xsB/khmUo/f83Fc22Li+9zRTwDToqMGbWonzE2mqu0/WydFU324hINdNJxddjQ xQn7+6/Jz2TqaWcnChBp4es6gyiPUp/gaGjpKMxcbkHnBlCn3JpAjORfsxl7EPPz67Qx fHJYTkS3tDdq1Q2w91sQDWFuCrQhV21xlL9+kkFSEVzwOj2wb97MA1USoieD95HoNebG 9BGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aHN0+fVZ+zarP1pXqBZ2o2UwTCRVDRmpnvslPu6IwLg=; b=T8v5E1lPbN/y6lpHl55tFnz53POttqwu46gR6zJiH+UEafMO6Fc0PqkIiAiiysgsXI gdWCYVQaLOJX64JGN0bm64kWBEYVVxdxHv3XeZpWPuXd/hFrdP9M59CiVNEQyB4G8g+i FWuiXuQA5ZiPz3Vgdh3zHE4hKimIChafeskLjXHK0ecZ/tCWdk6DmwJUSmXzutUcOai/ erdqT9uNi3/8PD91gem2Z8Ld+3+L3rMUGH3fnT0E/gzPv7n9Umvpk//7indYX8ddfWx6 t1hTs80Oj1tJ/t9HU6KeLjEDpmW/gbp6lxaj3RBFJ6IeOKyXaK7gpEyAI79LLSPJ4j8t DtPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QZJ9kSef; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h25si12846455ejd.683.2021.03.29.03.55.02; Mon, 29 Mar 2021 03:55:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QZJ9kSef; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235503AbhC2InC (ORCPT + 99 others); Mon, 29 Mar 2021 04:43:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:42788 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232532AbhC2IYn (ORCPT ); Mon, 29 Mar 2021 04:24:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E1B50619B1; Mon, 29 Mar 2021 08:24:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617006282; bh=LtP11KFsRCojbMf2d1B9su3MJUULHpb/epcyz7sE6SA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QZJ9kSefzubSQ5lcrfr6SsPYcMNotcMMA6WwWoP9oa3tqwtDdMAMQ7slDSVums5Ke uoJPUvNtkzKaQFs6mRj02DbJ5aAsDvtV4n4pnKdMWze0iQLFha9sBoyi4u4qmV3kY6 hdH43h15uNb8gItiD79TvSED4ceXWGbhStykDaak= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Boris Ostrovsky , Sasha Levin Subject: [PATCH 5.10 177/221] xen/x86: make XEN_BALLOON_MEMORY_HOTPLUG_LIMIT depend on MEMORY_HOTPLUG Date: Mon, 29 Mar 2021 09:58:28 +0200 Message-Id: <20210329075635.054333643@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Roger Pau Monne [ Upstream commit 2b514ec72706a31bea0c3b97e622b81535b5323a ] The Xen memory hotplug limit should depend on the memory hotplug generic option, rather than the Xen balloon configuration. It's possible to have a kernel with generic memory hotplug enabled, but without Xen balloon enabled, at which point memory hotplug won't work correctly due to the size limitation of the p2m. Rename the option to XEN_MEMORY_HOTPLUG_LIMIT since it's no longer tied to ballooning. Fixes: 9e2369c06c8a18 ("xen: add helpers to allocate unpopulated memory") Signed-off-by: Roger Pau Monné Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/20210324122424.58685-2-roger.pau@citrix.com Signed-off-by: Boris Ostrovsky Signed-off-by: Sasha Levin --- arch/x86/xen/p2m.c | 4 ++-- drivers/xen/Kconfig | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index 60da7e793385..674b83ffe4d6 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c @@ -98,8 +98,8 @@ EXPORT_SYMBOL_GPL(xen_p2m_size); unsigned long xen_max_p2m_pfn __read_mostly; EXPORT_SYMBOL_GPL(xen_max_p2m_pfn); -#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG_LIMIT -#define P2M_LIMIT CONFIG_XEN_BALLOON_MEMORY_HOTPLUG_LIMIT +#ifdef CONFIG_XEN_MEMORY_HOTPLUG_LIMIT +#define P2M_LIMIT CONFIG_XEN_MEMORY_HOTPLUG_LIMIT #else #define P2M_LIMIT 0 #endif diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig index 41645fe6ad48..ea0efd290c37 100644 --- a/drivers/xen/Kconfig +++ b/drivers/xen/Kconfig @@ -50,11 +50,11 @@ config XEN_BALLOON_MEMORY_HOTPLUG SUBSYSTEM=="memory", ACTION=="add", RUN+="/bin/sh -c '[ -f /sys$devpath/state ] && echo online > /sys$devpath/state'" -config XEN_BALLOON_MEMORY_HOTPLUG_LIMIT +config XEN_MEMORY_HOTPLUG_LIMIT int "Hotplugged memory limit (in GiB) for a PV guest" default 512 depends on XEN_HAVE_PVMMU - depends on XEN_BALLOON_MEMORY_HOTPLUG + depends on MEMORY_HOTPLUG help Maxmium amount of memory (in GiB) that a PV guest can be expanded to when using memory hotplug. -- 2.30.1