mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Roger Pau Monne <roger@xenproject.org>,
	Roger Pau Monne <roger.pau@citrix.com>,
	xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org, Yannick Martin <yannick.martin@okazoo.eu>,
	Thorsten Leemhuis <regressions@leemhuis.info>,
	Matthias Goergens <matthias.goergens@gmail.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Subject: Re: [PATCH v2] x86/xen: fix init of balloon stats again
Date: Wed, 5 Aug 2026 14:04:41 +0200	[thread overview]
Message-ID: <bed904b1-792e-4233-86a1-6c38678c9689@suse.com> (raw)
In-Reply-To: <20260805094008.95778-1-roger@xenproject.org>


[-- Attachment #1.1.1: Type: text/plain, Size: 1174 bytes --]

On 05.08.26 11:40, Roger Pau Monne wrote:
> The handling of extra memory regions done in balloon_add_regions() is not
> correct for PV guests, since the initial target is set to reflect the real
> memory the system has, not what's described on the memory map, which can be
> higher if memory != maxmem.
> 
> Introduce separate logic for addition vs subtraction in
> balloon_add_regions() and handle extra regions correctly by adding them to
> the total amount of pages, instead of subtracting from the current and
> target pages amounts.
> 
> In the common case PV domU/dom0 and PVH dom0 will use the addition path,
> since the initial target reflects the real assigned memory.  HVM and PVH
> domUs use the subtraction path, since the target is set based on the amount
> of memory reported in the memory map, without accounting for released
> regions.
> 
> Fixes: 87af633689ce ("x86/xen: fix balloon target initialization for PVH dom0")
> Fixes: 0949c646d646 ("Partial revert "x86/xen: fix balloon target initialization for PVH dom0"")
> Signed-off-by: Roger Pau Monné <roger@xenproject.org>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

      parent reply	other threads:[~2026-08-05 12:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30 14:35 [PATCH] x86/xen: fix init of balloon stats for PV guests with memory != maxmem Roger Pau Monne
2026-08-03 14:12 ` Juergen Gross
2026-08-05  4:46 ` Matthias Goergens
2026-08-05  8:43   ` Roger Pau Monné
2026-08-05  9:40 ` [PATCH v2] x86/xen: fix init of balloon stats again Roger Pau Monne
2026-08-05 11:50   ` Matthias Goergens
2026-08-05 12:04   ` Juergen Gross [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bed904b1-792e-4233-86a1-6c38678c9689@suse.com \
    --to=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthias.goergens@gmail.com \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=regressions@leemhuis.info \
    --cc=roger.pau@citrix.com \
    --cc=roger@xenproject.org \
    --cc=sstabellini@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=yannick.martin@okazoo.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®