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

Re: [PATCH v9 6/6] docs: Document CPU hotplug


  • To: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • From: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
  • Date: Thu, 8 Oct 2026 08:48:43 +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=5mS4FDbP6ENKZD64FEZ8XvAoAMwqSYYfUVdgtbLP0wE=; b=NaNdi4JzoSW1+MGmAqEEEn2TV3C9whHelXvoI2Jy1tOJAlpZmBWKgnGOQiw7hLzdbwyQ2ijM4ueOOuYeMUw0JenZ688epsBJ1LOTr/rl2W+/fj2XZZO6QFklQxg7bxKALQqBClsFNSOFeWqypDhCoXfmeY3Qb38W3BV7QDWELRAZUZcZfb60BlEHl+FaLLOcp+5k0DSSfhCFr+ZHy5Us9UUjUvCZJKbyzul8QygzKOsRxgjDPJerbu7TQC/EkMafR0yhcawEbqonv5BgSxSs3ty9D/OHF43WJhku9ZksGUwkB+N5d+6p6m5+sQ2vlafRzVS6QGl0MwJjtoHx1CYc0A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=krvh39CFNZ65y0sKVCVSF1vvWSsuzchXg6XPq07gjhV3BN+Ikg75zuZcorm87AccT5eIWhc8qcfuoxnY4DdR+80XrQiCG3xxbuAxe/l9mi3G3AcDqYxqI3LebUPam1yFLuKphyE8Xa0ht0o1DhpRqQ10BbJj7GcBblfjA83nEA54yrQmqBFxpVgVJhXFrKGhUuxPDcXx3rN8sO58Z7VtA4Ms4pemPmNhR3Xkd+QmV9LRcw08UpGhRqun7QXBByHrZsa0jkAjhSR4e4/Xv45osSQEYa4+BfNiTxHaiz4hWqWCRFvslErhgVG3UmIZPJbOH5qP1ghCoXLYTPvbav0zpw==
  • 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: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Thu, 08 Oct 2026 08:48:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHdLu5YUFC+BXJe80SorzYjSmg7ErbzpccA
  • Thread-topic: [PATCH v9 6/6] docs: Document CPU hotplug

On 9/22/26 4:13 AM, Volodymyr Babchuk wrote:
> Hi,
> 
> Mykyta Poturai <Mykyta_Poturai@xxxxxxxx> writes:
> 
> I have a couple of questions, please see below
> 
>> Signed-off-by: Mykyta Poturai <mykyta_poturai@xxxxxxxx>
>> ---
>> v8->v9:
>> * fix typos
>>
>> v7->v8:
>> * remove support status update
>> * update config option name
>>
>> v6->v7:
>> * add testing and limitations
>>
>> v5->v6:
>> * no changes
>>
>> v4->v5:
>> * s/supported/implemented/
>> * update SUPPORT.md
>>
>> v3->v4:
>> * update configuration section
>>
>> v2->v3:
>> * patch introduced
>> ---
>>   docs/misc/cpu-hotplug.txt | 98 +++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 98 insertions(+)
>>   create mode 100644 docs/misc/cpu-hotplug.txt
>>
>> diff --git a/docs/misc/cpu-hotplug.txt b/docs/misc/cpu-hotplug.txt
>> new file mode 100644
>> index 0000000000..4f6068db30
>> --- /dev/null
>> +++ b/docs/misc/cpu-hotplug.txt
>> @@ -0,0 +1,98 @@
>> +CPU Hotplug
>> +===========
>> +
>> +CPU hotplug is a feature that allows pCPU cores to be added to or removed 
>> from a
>> +running system without requiring a reboot. It is implemented on x86 and 
>> Arm64
>> +architectures.
>> +
>> +Implementation Details
>> +----------------------
>> +
>> +CPU hotplug is implemented through the `XEN_SYSCTL_CPU_HOTPLUG_*` sysctl 
>> calls.
>> +The specific calls are:
>> +
>> +- `XEN_SYSCTL_CPU_HOTPLUG_ONLINE`: Brings a pCPU online
>> +- `XEN_SYSCTL_CPU_HOTPLUG_OFFLINE`: Takes a pCPU offline
>> +- `XEN_SYSCTL_CPU_HOTPLUG_SMT_ENABLE`: Enables SMT threads (x86 only)
>> +- `XEN_SYSCTL_CPU_HOTPLUG_SMT_DISABLE`: Disables SMT threads (x86 only)
>> +
>> +All cores can be disabled, assuming hardware support, except for the boot 
>> core.
>> +Sysctl calls are routed to the boot core before doing any actual up/down
>> +operations on other cores.
>> +
>> +If there are Xen-bound interrupts pinned to the pCPU being offlined, they 
>> will
>> +be automatically migrated to other online pCPUs. Interrupts used by guest
>> +domains are handled by the scheduler when it reschedules the vCPUs to a new,
>> +online, pCPU. When a pCPU is being onlined, some Xen-bound interrupts will 
>> get
>> +redistributed to the newly onlined pCPU to prevent imbalance.
>> +
>> +If pCPU being offlined has some vCPUs pinned to it, they will be 
>> automatically
>> +unpinned and migrated to other online pCPUs.
>> +
>> +Limitations
>> +-----------
>> +
>> +On Arm64 cpu hotplug is currently not compatible with ITS, due to an issue 
>> with
>> +the redistributor assignment.
> 
> In this case you probably want to make sure that
> CONFIG_CPU_ONLINE_OFFLINE is incompatible with CONFIG_HAS_ITS
> 
>> +
>> +On Arm64 there can be problems with FFA if secure FW supports the 
>> notification
>> +ABI, and with TEE, as both use non-static IRQ actions.
> 
> Could you please elaborate on this? AFAIK, OP-TEE has own
> cpu_up/cpu_down callbacks, so it should know which CPUs are online.

It's more of a problem with the way interrupt handlers are set up in 
Xen. Mykola already has fixes for it in a separate series, but I'm not 
how to best sync up our efforts.

https://patchew.org/Xen/cover.1787838455.git.mykola._5Fkvach@xxxxxxxx/623be9a0a5603073f25d009979ab49b611e7dddc.1787838455.git.mykola._5Fkvach@xxxxxxxx/

https://patchew.org/Xen/cover.1787838455.git.mykola._5Fkvach@xxxxxxxx/cc10888f34e887f739d66312aa871a6df4196204.1787838455.git.mykola._5Fkvach@xxxxxxxx/


 


Rackspace

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