[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 5/6] tools: Allow building xen-hptool without CONFIG_MIGRATE


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
  • Date: Thu, 16 Apr 2026 08:22:32 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dOdlTcrJXzFiibxdFJRgpXKFhxgyJoch+FjgdX+thX4=; b=s2sLCGf2k1gpUqqzAum5vclawyU0XzYlXXyGA7lpg/nUqOjXYApLyg6y3w5suS2eDhs7P8AD8qmpvPmv10DPSvGW0J78BZYkFOVBIE75/qXwnPiQ2HG/rzqQZ/J4L8pkxyiGiawPexaAwr3cDeLz26Zby53B+7Di52/cU4tEag0c59nQBB72UjZrxEHoHAG2m8srWPjM7Tn4K5FvKwAN5U8wKDrfgjMaLh9rPhWQ7nhqvkBJgXAFzok3VPPmkijuXbep3HBOvyX+OLt0c3IIh5bk4BEKkCbuLwi7hCgt6f7aRZSUHorptIiSfla4SbX7yhPSX4ljDCb+A/9gXqe9yw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SQ56SlUlDhD6Vku9RvhKluP0JXUCySGwvhUoGHG8wBYnVxJEHjrAlOs0kMHhW1lmI1Riu2iKQYUYDR8WkhLcpGQuilc1mV+eIzEkx69HsvVRQH4f7nwow5E2AjqQgWTRSKkiOMcXU1GzsJ4an59ewHTQaCwcKGEIPg6Hz/j0DzAWSDtpm9JK05aJP/9SSrkcMZHw3AiGPvqCeJpk1aHZAMdzJdY7YBrE3Ft4J/LLStjt5rT6BjLXb0XpOXyj2oNZS5nBPguI6aypm5dp7RaTLmfbUXAAk8GzDTgwq38pHHyq/sQ3KDmTyW0G4uRSxP0hNh6Qp6mEujeLJ291l0/dzQ==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 16 Apr 2026 08:22:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHcwDy3LJnr4T20vUWAas874pXmi7XHAiYAgBlL+wCAAQu/AIAAGf4A
  • Thread-topic: [PATCH v7 5/6] tools: Allow building xen-hptool without CONFIG_MIGRATE

On 4/16/26 09:49, Jan Beulich wrote:
> On 15.04.2026 16:51, Mykyta Poturai wrote:
>> On 3/30/26 15:32, Jan Beulich wrote:
>>> On 30.03.2026 13:59, Mykyta Poturai wrote:
>>>> With CPU hotplug sysctls implemented on Arm it becomes useful to have a
>>>> tool for calling them.
>>>>
>>>> According to the commit history it seems that putting hptool under
>>>> config MIGRATE was a measure to fix IA64 build. As IA64 is no longer
>>>> supported it can now be brought back. So build it unconditionally.
>>>>
>>>> Signed-off-by: Mykyta Poturai <mykyta_poturai@xxxxxxxx>
>>>> ---
>>>> v6->v7:
>>>> * no changes
>>>>
>>>> v5->v6:
>>>> * don't change order in Makefile
>>>>
>>>> v4->v5:
>>>> * make hptool always build
>>>>
>>>> v3->v4:
>>>> * no changes
>>>>
>>>> v2->v3:
>>>> * no changes
>>>>
>>>> v1->v2:
>>>> * switch to configure from legacy config
>>>> ---
>>>>    tools/libs/guest/Makefile.common | 2 +-
>>>>    tools/misc/Makefile              | 2 +-
>>>>    2 files changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/tools/libs/guest/Makefile.common 
>>>> b/tools/libs/guest/Makefile.common
>>>> index b928a4a246..03dfcee7fa 100644
>>>> --- a/tools/libs/guest/Makefile.common
>>>> +++ b/tools/libs/guest/Makefile.common
>>>> @@ -7,6 +7,7 @@ OBJS-y += xg_private.o
>>>>    OBJS-y += xg_domain.o
>>>>    OBJS-y += xg_suspend.o
>>>>    OBJS-y += xg_resume.o
>>>> +OBJS-y += xg_offline_page.o
>>>>    ifeq ($(CONFIG_MIGRATE),y)
>>>>    OBJS-y += xg_sr_common.o
>>>>    OBJS-$(CONFIG_X86) += xg_sr_common_x86.o
>>>> @@ -17,7 +18,6 @@ OBJS-$(CONFIG_X86) += xg_sr_save_x86_pv.o
>>>>    OBJS-$(CONFIG_X86) += xg_sr_save_x86_hvm.o
>>>>    OBJS-y += xg_sr_restore.o
>>>>    OBJS-y += xg_sr_save.o
>>>> -OBJS-y += xg_offline_page.o
>>>>    else
>>>>    OBJS-y += xg_nomigrate.o
>>>>    endif
>>>
>>> This looks wrong to me. There are x86-specifics in that file, which 
>>> shouldn't
>>> be built on Arm. And the name of the file also doesn't indicate any relation
>>> to CPU management.
>>
>> xen-hptool requires xg_offline_page as it has both CPU and memory
>> hotplug commands. Without building xg_offline_page it fails with
>>
>> xen-hptool: symbol lookup error: xen-hptool: undefined symbol:
>> xc_mark_page_offline, version libxenguest_4.22.0
>>
>> when trying to do memory ops.
>>
>> Is it an acceptable behavior?
> 
> I don't think so, no. The tool wouldn't, aiui, load at all then if built with
> "bindnow" enabled.
> 
>> If so I guess we can build xg_offline page only on x86.
> 
> We still need to, imo. But the tool still needs to be usable no matter how
> specifically it is built. It should avoid referencing xg_offline_page.c
> functions when built for non-x86.
> 
> Jan

As I understand, the usage of arch-specific compile time checks is 
heavily discouraged in tools. So I don’t think it would be approved by 
tools maintainers. Do we really need to omit this file if memory ops are 
already getting blocked by Xen on Arm anyway?

-- 
Mykyta

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.