[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <634471a1-1185-4644-aeea-7891e62bc1f0@suse.com>
Date: Thu, 22 Jan 2026 08:17:22 +0100
From: Jan Beulich <jbeulich@...e.com>
To: Roger Pau Monné <roger.pau@...rix.com>
Cc: xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
James Dingwall <james@...gwall.me.uk>, Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>,
Jason Andryuk <jason.andryuk@....com>
Subject: Re: [PATCH] Partial revert "x86/xen: fix balloon target
initialization for PVH dom0"
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");
>
Powered by blists - more mailing lists