mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
	James Dingwall <james@dingwall.me.uk>,
	Juergen Gross <jgross@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
	Jason Andryuk <jason.andryuk@amd.com>
Subject: Re: [PATCH] Partial revert "x86/xen: fix balloon target initialization for PVH dom0"
Date: Thu, 22 Jan 2026 08:17:22 +0100	[thread overview]
Message-ID: <634471a1-1185-4644-aeea-7891e62bc1f0@suse.com> (raw)
In-Reply-To: <aXERjdPS3KlcD3C-@Mac.lan>

On 21.01.2026 18:49, Roger Pau Monné wrote:
> --- a/drivers/xen/balloon.c
> +++ b/drivers/xen/balloon.c
> @@ -724,7 +724,8 @@ static int __init balloon_add_regions(void)
>  static int __init balloon_init(void)
>  {
>  	struct task_struct *task;
> -	unsigned long current_pages;
> +	unsigned long current_pages = 0;

With this, ...

> @@ -732,8 +733,13 @@ static int __init balloon_init(void)
>  
>  	pr_info("Initialising balloon driver\n");
>  
> -	current_pages = xen_pv_domain() ? min(xen_start_info->nr_pages, max_pfn)
> -	                                : get_num_physpages();
> +	if (xen_initial_domain())
> +		current_pages = HYPERVISOR_memory_op(XENMEM_current_reservation,
> +		                                     &domid);
> +	if (current_pages <= 0)

... why <= ? Gives the impression you may mean to cover HYPERVISOR_memory_op()
returning an error, yet that'll require a signed long variable then.

Jan

> +		current_pages =
> +		    xen_pv_domain() ? min(xen_start_info->nr_pages, max_pfn)
> +	                            : get_num_physpages();
>  
>  	if (xen_released_pages >= current_pages) {
>  		WARN(1, "Released pages underflow current target");
> 


  reply	other threads:[~2026-01-22  7:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-20 14:06 Roger Pau Monne
2026-01-20 15:33 ` Roger Pau Monné
2026-01-20 20:10 ` Jason Andryuk
2026-01-21 11:17   ` Roger Pau Monné
2026-01-21 17:21     ` Jason Andryuk
2026-01-21 17:49       ` Roger Pau Monné
2026-01-22  7:17         ` Jan Beulich [this message]
2026-01-22  8:23           ` Roger Pau Monné
2026-01-22 14:40         ` Jason Andryuk
2026-01-22 16:57           ` Roger Pau Monné
2026-01-22 17:03             ` Jason Andryuk
2026-01-22 17:46               ` Roger Pau Monné
2026-01-21 11:03 ` James Dingwall

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=634471a1-1185-4644-aeea-7891e62bc1f0@suse.com \
    --to=jbeulich@suse.com \
    --cc=james@dingwall.me.uk \
    --cc=jason.andryuk@amd.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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®