[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] xen: move XEN_BALLOON_MEMORY_HOTPLUG to generic config


  • To: Lukas Bulwahn <lukas.bulwahn@xxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>
  • Date: Wed, 10 Aug 2022 11:32:28 +0000
  • Accept-language: en-US, ru-RU
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=c9+hatWRbvsl4UX9qNd0GKihD3i2LitosVsKeBtTRIg=; b=nOWJG14amAvpRBxHNItKGpsVRoARMHQZMoCoavsILghwnWxTvP884E+eyRAcCjlLQmZIhbJIlK1/o/c2RPwoTsbcwU9J6adv2q4783PgghQfqNvkr5axn/fWaDQIsozWGODOErfuQpMZrpWj7abMHpfwUwe2qcDpyiX04k6aBdF1j2FkdSYCilrFuqhSCYHTMdi1m0qdaEXzDEOxmItE2SL4791E82dmoeMsx3dcR6Ho/BfcYrx2G9mwoQJeDv/GR54EEo1Jvy8i0RBSjpYvdGs7jshSRrr4MOhjEmInBDBe2hSpXYFP20SQPRmcq5gXJka+biyksp7To3wY+d943A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D506oHzK3eSdt5ypcaRz1a46mpQwDqfYVJQ0Kloxffyq0biFMPntykAJAejn2CPSjbNVuzPeN0NaVii+GwVy8vZ+7WgAz8AoERAncgOfNZ4BrTeowteDjgaeB+m8bpXRWhK5Z1npG28/6qtMj7YE/DFgjJy7MWKEdJQ4GMotXsRUyreYdNQ6qNl88GeT3wK40FGO4ZiadjHZZUD5UXFlIGFo1BnbG6WZgUacVcqOci3LDRv+rrOVDlDAmnCpt44r3MDNBt7wqdm+Y1flOaEnPyqXjXAUIhvGYl8a8vBZSXdAFSBamKmx3Ek3DSEnsURwE2I2cmT+ecks5aG6ZvrKEg==
  • Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, "H . Peter Anvin" <hpa@xxxxxxxxx>, "kernel-janitors@xxxxxxxxxxxxxxx" <kernel-janitors@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 10 Aug 2022 11:33:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYrHcjLoZ+Ck4yj0aYNvWHl5MnO62oAMgA
  • Thread-topic: [PATCH 3/4] xen: move XEN_BALLOON_MEMORY_HOTPLUG to generic config

On 10.08.22 08:07, Lukas Bulwahn wrote:

Hello Lukas, all

> While reviewing arch/x86/configs/xen.config, I noticed the following
> note in this file:
>
>    '# depends on MEMORY_HOTPLUG, arm64 doesn't enable this yet,
>    '# move to generic config if it ever does.
>    CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
>
> Commit 6c6685055a28 ("kconfig: add xenconfig defconfig helper") in June
> 2015 adds this note. Fortunately, commit 4ab215061554 ("arm64: Add memory
> hotplug support") from December 2018 adds the memory hotplug in arm64, so
> the precondition of this note above is now met.
>
> Move setting the config XEN_BALLOON_MEMORY_HOTPLUG into the generic
> xen.config now.


I might have missed something but I have never heard of anyone using 
XEN_BALLOON_MEMORY_HOTPLUG on Arm.

Looking into the code, I am afraid, CONFIG_XEN_BALLOON_MEMORY_HOTPLUG 
won't be functional on Arm without reworking resource allocation logic 
in drivers/xen/ballon.c at least, since system "iomem_resource" cannot 
be used on Arm to allocate unused memory region(s), please see 
additional_memory_resource(). I might be wrong, but it feels to me that 
here we would need a similar logic like in 
drivers/xen/unpopulated-alloc.c which is functional on Arm since it uses 
specific Xen resource (on x86 it is just an iomem_resource, but on Arm 
it contains provided by the hypervisor extended regions).

I am not aware of anyone working on it, so I wouldn't enable that 
support on Arm by default until the code is updated.



>
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@xxxxxxxxx>
> ---
>   arch/x86/configs/xen.config | 3 ---
>   kernel/configs/xen.config   | 1 +
>   2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/arch/x86/configs/xen.config b/arch/x86/configs/xen.config
> index 8a6c88f48e75..024817bc4f0e 100644
> --- a/arch/x86/configs/xen.config
> +++ b/arch/x86/configs/xen.config
> @@ -23,6 +23,3 @@ CONFIG_XEN_ACPI_PROCESSOR=m
>   CONFIG_XEN_PCIDEV_BACKEND=m
>   # x86 specific frontend drivers
>   CONFIG_XEN_PCIDEV_FRONTEND=m
> -# depends on MEMORY_HOTPLUG, arm64 doesn't enable this yet,
> -# move to generic config if it ever does.
> -CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
> diff --git a/kernel/configs/xen.config b/kernel/configs/xen.config
> index 436f806aa1ed..ea84d5b3122d 100644
> --- a/kernel/configs/xen.config
> +++ b/kernel/configs/xen.config
> @@ -34,6 +34,7 @@ CONFIG_INPUT_XEN_KBDDEV_FRONTEND=m
>   CONFIG_XEN_SCSI_FRONTEND=m
>   # others
>   CONFIG_XEN_BALLOON=y
> +CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
>   CONFIG_XEN_DEV_EVTCHN=m
>   CONFIG_XEN_BLKDEV_FRONTEND=m
>   CONFIG_XEN_NETDEV_FRONTEND=m

-- 
Regards,

Oleksandr Tyshchenko

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.