[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aXHej39h5cAs5-UL@Mac.lan>
Date: Thu, 22 Jan 2026 09:23:43 +0100
From: Roger Pau Monné <roger.pau@...rix.com>
To: Jan Beulich <jbeulich@...e.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 Thu, Jan 22, 2026 at 08:17:22AM +0100, Jan Beulich wrote:
> 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.
Oh, indeed, current_pages should be signed long. This was an untested
mash-up of a slightly different patch, where I didn't realize that
current_pages was unsigned.
Thanks, Roger.
Powered by blists - more mailing lists