[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7bc9a67e-a73a-4c12-9e35-01cb8db27fe1@suse.com>
Date: Fri, 10 May 2024 08:35:52 +0200
From: Jürgen Groß <jgross@...e.com>
To: Roger Pau Monne <roger.pau@...rix.com>, xen-devel@...ts.xenproject.org,
linux-kernel@...r.kernel.org
Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] xen/x86: add extra pages to unpopulated-alloc if
available
On 29.04.24 17:50, Roger Pau Monne wrote:
> Commit 262fc47ac174 ('xen/balloon: don't use PV mode extra memory for zone
> device allocations') removed the addition of the extra memory ranges to the
> unpopulated range allocator, using those only for the balloon driver.
>
> This forces the unpopulated allocator to attach hotplug ranges even when spare
> memory (as part of the extra memory ranges) is available. Furthermore, on PVH
> domains it defeats the purpose of commit 38620fc4e893 ('x86/xen: attempt to
> inflate the memory balloon on PVH'), as extra memory ranges would only be
> used to map foreign memory if the kernel is built without XEN_UNPOPULATED_ALLOC
> support.
>
> Fix this by adding a helpers that adds the extra memory ranges to the list of
> unpopulated pages, and zeroes the ranges so they are not also consumed by the
> balloon driver.
>
> This should have been part of 38620fc4e893, hence the fixes tag.
>
> Note the current logic relies on unpopulated_init() (and hence
> arch_xen_unpopulated_init()) always being called ahead of balloon_init(), so
> that the extra memory regions are consumed by arch_xen_unpopulated_init().
>
> Fixes: 38620fc4e893 ('x86/xen: attempt to inflate the memory balloon on PVH')
> Signed-off-by: Roger Pau Monné <roger.pau@...rix.com>
Reviewed-by: Juergen Gross <jgross@...e.com>
Juergen
Powered by blists - more mailing lists