From patchwork Wed Mar 17 11:04:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Roger Pau Monne X-Patchwork-Id: 12145499 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6113FC433E6 for ; Wed, 17 Mar 2021 11:06:05 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C30D64F4F for ; Wed, 17 Mar 2021 11:06:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C30D64F4F Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.98627.187142 (Exim 4.92) (envelope-from ) id 1lMTzc-0008TO-Ix; Wed, 17 Mar 2021 11:05:36 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 98627.187142; Wed, 17 Mar 2021 11:05:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lMTzc-0008TH-El; Wed, 17 Mar 2021 11:05:36 +0000 Received: by outflank-mailman (input) for mailman id 98627; Wed, 17 Mar 2021 11:05:35 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lMTzb-0008Rx-IQ for xen-devel@lists.xenproject.org; Wed, 17 Mar 2021 11:05:35 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b583e291-a162-4caa-9f71-64d8892872b2; Wed, 17 Mar 2021 11:05:33 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b583e291-a162-4caa-9f71-64d8892872b2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1615979133; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=wp0RccVI1tCqlieLeZR40m+vQPb4oS3BJx8bkuHZwN0=; b=XklvQePTUfA8fzYAEY23VNWeDIFALw/Oo54gWIvwANdKxfwdz/oPZk+U +X9zKEwTiEEyT6u0yCDNMQsyxoxmEXiv/OyImy/vhjJfYuB+58VChaKxn ur/KYc9HaaPrwJTDOcl6GmGH+LEfqzLU1pSyB1no2rqIYp8CASP89bxyd w=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com IronPort-SDR: hoRtLp/ly252ADuLwJafpUylXwz4p4ZiwRc5U6scuqSgiki0SkUt7B0C2n88f8x2BDVlM26gDS URlQmWOOswm/gDLbd+UG94itg7FJZifMGkW5L4zLwojf1+rXQlE0yp2wxMg07AWJwTSoqrWRD2 B40Lmfm5j7RBlx5P+tMg17quQ4/tTdsgjnDClMj7dqDJV4j8EjL/oRC0JxiE0Ya1L6jX7zzbI1 G+MngiXMEdO7Y/UW0jlLWv7ND/OjI43EEuJuIRyLpdNDqzmQssmNBD9+2aL2DKQfVu+cW28n3T Cks= X-SBRS: 5.2 X-MesageID: 39488646 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:HKNhB6kcXwf/Yrolt1Uu+ZaU3ArpDfP2imdD5ilNYBxZY6Wkvu izgfUW0gL1gj4NWHcm3euNIrWEXGm0z/NIyKMWOqqvWxSjhXuwIOhZnO7f6hDDOwm7zO5S0q 98b7NzYeebMXFWhdv3iTPWL/8O29+CmZrHuc7771NACT5ncLth6QARMHf4LmRTSBNdDZQ0UL qwj/AmmxOadX4abtu2CxA+NoCum/TxmI/7ehlDPhY76WC15g+A0qLwEBSTw34lIlBy6IolmF KlryXJop+Nntv+4R/a2m/V4f1t6aHc4+oGPuOgoIw4Lj3tjyyheYhuXaaT1QpF3d2H2RIRv/ Tn5zsmIsRv+1PdF1vF3SfF6k3b/xsFr1/k1FOCjnPoraXCNU0HIvsEv611WF/9ySMbzbVB+Z MO5U21nd5rKCmFuyLH693BR3hR5zKJiEtnq8E/pThiS4cEAYUhyrA3zQduP7orOjn104wjGP kGNrCm2N9mNWmXaH3UpQBUsbqRd0V2Gh+HR34LsdCO3w5Xm2hkz1AZyNZ3pAZ4yK4A X-IronPort-AV: E=Sophos;i="5.81,256,1610427600"; d="scan'208";a="39488646" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NJpMJF05/FZw3BFa1guhmg91XypIA7XIg07QNSAWFG34jxaNVL3gezDeji69GhLJUlBizfzItd8pKzx0lPkOzTThBbhrga2lwhPpBnWWvFB8zV4+EIE/apjL9SzSTXDKbpazom+vzsClpOjv3Bs6NbahcNCm/34pK63u66SqBf6PaPZElWmDUF5b1a5PzMmi87CIzDnQITi4ISK9vayBaSeNSkIE+/NFB0UrfK8kbQR09PPqytOovuXWJeEHHnm2J+qM7LoynQI9c/Fat+PNt/Jq8lFYdMmujWz2by3CKRuC5aNgh53nnWsCsn7kybNaU+J5kkghBLGnrwrR/rBgzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sdo8EeuM+xU2F1GMX+fxj8Mg5M4tPEbvnO/5QsPd9n8=; b=DK1LMh3RYXcHu1wjCIupI8WWwcRMxusZNcmYEX0Zw2ATMNzs9pddkEoPtWHj2KvS24SodlEBFVyGjJKsJazHl6XtJkGXsHw8waSWWnnW54cCNzrUIxJMegO446YhkXEqMD8gNkixGALLP3WipiA+eJJL6WKYT/f4HDxJilVZblHJsz75HhZmf99HwbAn2jBn1ugua/r9jReMV7LZH94e/4BeSCJkE6TxcA4WSUX5/DCrDLCciYfPuCL7xthfpmFAvzgdzamdFvnMkSceHmeVWh2f2W5NGxPSV5jfQQAgRoz80ZiIDo4DxG6A6UN5KocEip+mifLbQrXrDD8JGenpFw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sdo8EeuM+xU2F1GMX+fxj8Mg5M4tPEbvnO/5QsPd9n8=; b=xljdE8q/Cvv6vda3O5BEPtD3EnC3eh0OomAeMevvBgS2THxJg8iPQTETFpLhpzUpmdT7e0fz/rXfxhGjIavuZvpAmEnONPguO/lN2YEBqoDWoSg/vKH/NItKwdLfrhHe7HEzWL8/kq3vZaKkomWIx3Yi+ftMlmaldrFWJl8kdDE= From: Roger Pau Monne To: CC: Roger Pau Monne , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Jan Beulich , Subject: [PATCH 1/2] xen/x86: make XEN_BALLOON_MEMORY_HOTPLUG_LIMIT depend on MEMORY_HOTPLUG Date: Wed, 17 Mar 2021 12:04:00 +0100 Message-ID: <20210317110401.46322-2-roger.pau@citrix.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210317110401.46322-1-roger.pau@citrix.com> References: <20210317110401.46322-1-roger.pau@citrix.com> X-ClientProxiedBy: MR2P264CA0161.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:1::24) To DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 171b86a0-9674-4c4c-cf25-08d8e9349471 X-MS-TrafficTypeDiagnostic: DM6PR03MB4137: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J+9A5LLVZaOp20IHx3zrh37q0KdRAFLYT1Q6iAJ1KnB+Naxi4udSAuXmKuj6gUxF5qwR/udgkMsbbYeeQdEv8oibcKoXVbLJf4CnIQ4sqX+71k6f+Mv0co53uS6d6D+uPmixqjaB3UjX/H4uYdFWNt9Gsv7Nt0JUC1MrdGj4zS7q2v4R+chi8F8YOPNOmeo282MYB3JwL0I1/Ga9QedWfsBpNHrr0rKbBPfeOsPMXqR0c6BX6ELjN124Csg1QzcjDa/IwLU/E11FsV4TUtP6e5Ajhn8hRdGixQsH6ZYr4UAkTUgmom8ahMSoBlW0kWyUtMK4nObunweZ7DTiqW1lJyKHx0aSvALP0Wrxshv45YskX6LqZhPLoISWoNsB718aPyJtPt8mSYTm7U310uMpNolA6I7B6+wTwOGzk4EAHx46ebZMuVVAwy+zmoAWDgz+Ge2QRqg2WrnYlL41ru7YiClDZYiKK4pOD8PI7qoOidwinIYUtDoxRofRdlSWGIbh6fGrDKp5i5RnnGJsoYQTX5t+R+mog3FAwZvVH3+DtH7pyzJ041EpXVLPHyM/ZN2H X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR03MB5608.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(346002)(136003)(396003)(376002)(366004)(36756003)(4326008)(2616005)(956004)(83380400001)(8676002)(8936002)(86362001)(5660300002)(66946007)(6486002)(66476007)(6496006)(478600001)(26005)(16526019)(186003)(66556008)(1076003)(6916009)(2906002)(6666004)(54906003)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?9iQZLxFIng5grUAcKce6ChqVLBiDCl?= =?utf-8?q?5SsTmlbsc18APVfwBa6E+u/jZ8jdGnbmRYkDKfQtOxdu4kfrcO1vzp4SpqdSSLYbg?= =?utf-8?q?cNJTIOOPcJDq58/4khJbLQSmF+682sqg7vnTg5ISOAmpAndZNHRURze7xcgIYx26g?= =?utf-8?q?3nNrOoUQIZvW0g5s8h7+efg7UsoPo3ye6LcNxS8cR3j2OQ7MfdnUIzUO/K5YMsb3G?= =?utf-8?q?WvNzT1mq1S3RrCjSzbxdXTryuckk9th8nBIUbo6l2DmX+pk73BXJ9het11mLwPiOg?= =?utf-8?q?aqMIPq95ZqST+kw9AVkl7xjjyomvFK3eVD2fkpT+DMRgMHUW11tot2fHhSEZnNVRG?= =?utf-8?q?r7Qd7P/yitIWvpadvsNAjsdHl+PZkSJdwwbvPOndv3iPHqpMXyFaug6NpB4dLA8G0?= =?utf-8?q?TgsH+Vuc/UFi2qaZh4J65kvWfy8a39U+bu09tY6R81emARXJDInZggR3G0lxyHO9m?= =?utf-8?q?nXp/eRx+8d4/W/4CMcMIm8RPdYankCPGT6vUxjYk5AL5ipZg+mWa9VloGumQor+FI?= =?utf-8?q?kPuIcJM/LiZLexfBpQce8RbJxmR7WIr/Vmys7gYtCv6hE70qzqCDPRVXtpIjWI3k1?= =?utf-8?q?beFWFJzv8kM7KiQkKWbmEpz56sy0OHw8635o9ai2AFceqvuInVfTpomPXok6DMusM?= =?utf-8?q?aUmCJyM8rn3by32Z9eCx6Q1guzIUm9JelIsJ8Kslx9ZV2nlno/Lh93077fkGMlV8V?= =?utf-8?q?xv9R4YFpch5NPJjJNstv1eGi4ZwAwD3XkcJORZfMLoUeA0q6i6AnNnmUvrHrQmiov?= =?utf-8?q?e43MM7GPZEpujB3rzMfv7NLasUqgA4KMHNrlJXKLbXxPh4UjKy9eyinee5FojKSNf?= =?utf-8?q?wl8JNP+TnNQXckGpuJVSEfLFs9WCvIxJB/ZOm8YSzsViJJ0PfOm0GU4Wa7LB+jEoR?= =?utf-8?q?0wrgqkENMcuzIoIKywDiEYePlP8EAFyPgC67Za+JOFuJm4qus9Ph97KwA1wJvykBF?= =?utf-8?q?AXhXtBSXmPUOb40Dq0BuzhDeXiMdOsNxp807MjkZxo82PKabkFGUC7bzREuOVtDmP?= =?utf-8?q?VUbX1QkZAiT02ZBjkarjG1iuqUocRRxYOhzAwVOupRCoP/ZkLvBKpdJnxDJN/VVKw?= =?utf-8?q?eWbvg8yc4fVe6PrvpqKAFqHvrpkiy6DtJlSCxHt/waIZpxlz5qDol3H7o++Ht4NSL?= =?utf-8?q?TIrbuNwlqXohA08IYs7f9CnKY4kyBuwVv/aB5faXc7l9OKaVh/Qihs7CzQMmR+1Vp?= =?utf-8?q?1A18dvXztHfbqGfC1KeaFfx/cmQIWW+0wOB6BAFIVOSS21qhCKzPVdCe9/hKXRfj7?= =?utf-8?q?YbpGl6miuccKhd?= X-MS-Exchange-CrossTenant-Network-Message-Id: 171b86a0-9674-4c4c-cf25-08d8e9349471 X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2021 11:05:31.3133 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EbYWaCZfLzd0baby1vWRHqeu+h7e3oJ82QAEm4XoAZG9HVkmnUWEM0i+KJkmeugMzVPJ3uw+IlCtaK5JQy6W5Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR03MB4137 X-OriginatorOrg: citrix.com 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é --- Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Jan Beulich Cc: xen-devel@lists.xenproject.org --- 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 17d80f751fcb..a33902d05e45 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.