[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4b519e14-57fb-45be-a8b1-2c69c80cdcc4@suse.com>
Date: Wed, 28 Jan 2026 16:23:23 +0100
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: James Dingwall <james@...gwall.me.uk>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Thomas Gleixner <tglx@...nel.org>, 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>,
Stefano Stabellini <sstabellini@...nel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>
Subject: Re: [PATCH 1/2] Partial revert "x86/xen: fix balloon target
initialization for PVH dom0"
On 28.01.26 12:05, Roger Pau Monne wrote:
> This partially reverts commit 87af633689ce16ddb166c80f32b120e50b1295de so
> the current memory target for PV guests is still fetched from
> start_info->nr_pages, which matches exactly what the toolstack sets the
> initial memory target to.
>
> Using get_num_physpages() is possible on PV also, but needs adjusting to
> take into account the ISA hole and the PFN at 0 not considered usable
> memory despite being populated, and hence would need extra adjustments.
> Instead of carrying those extra adjustments switch back to the previous
> code. That leaves Linux with a difference in how current memory target is
> obtained for HVM vs PV, but that's better than adding extra logic just for
> PV.
>
> However if switching to start_info->nr_pages for PV domains we need to
> differentiate between released pages (freed back to the hypervisor) as
> opposed to pages in the physmap which are not populated to start with.
> Introduce a new xen_unpopulated_pages to account for papges that have
> never been populated, and hence in the PV case don't need subtracting.
>
> Fixes: 87af633689ce ("x86/xen: fix balloon target initialization for PVH dom0")
> Reported-by: James Dingwall <james@...gwall.me.uk>
> Signed-off-by: Roger Pau Monné <roger.pau@...rix.com>
Reviewed-by: Juergen Gross <jgross@...e.com>
Juergen
Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3684 bytes)
Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (496 bytes)
Powered by blists - more mailing lists