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

[PATCH v3 5/5] docs: Document CPU hotplug


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
  • Date: Fri, 10 Oct 2025 09:21:53 +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=AToR280Ck6+ZL6TnH21R3RTZINBkxX3LZEidlj0YVUc=; b=cMo8L7/CACGRPtCzEd+JZJVhA3JZ6a8zy/i5N9MUsjM6uHCRumldIOniYMzzv3Zgd5/BvKUrg+Shq+aXf0Hq7XwTv1PVgt21pUSSWOiVLbUUQjD1B4iSgsHKAchxsbNil049M4XN0QfVKk3ueLWmtqK6QmPznFchrN9MvX95W7zXkKRO0ANWyrS+iqjKfMMeSm2hStubpU+BzCZfZNKMWN3UtM+8Eh6Z1SdaUreYSDJ4hFLETbQrnUSAYm14QnPFDprfsFOH3rbDmp8Ru0+YiY6Mv7can8B7FrrZmqAAUkmOH2Wih09LqwSZUWceV10+G/VFVs8LtH/9YD3i3R3SOg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cClscKG151OiELPCUjtwjUlSQcoTg5QrOpoKjrtmoiKjSdbUbTGUDtXVSwC0m1EmEOvFI7yRFV7uldpPotCc+yHNRFmiuxE3SSvMGbHBLXiHXqeRNsaiCeHeFb2f6hFb8BOIuydOYeXPvAQZ5IFY+PSm07b/M/M2XpqzlHTAW5OVPt74rN+5I/eVOpHYCnCS2St/PnOc5KMHx/tfwRRIbsY3tLRfFfNJoON382dw4d1UoLZra1XkQ9ZTtmdFLK/I96U0CjGYZt7ah9WWM9xKfvYVpQFcLQrScIaLqRPA8H8tY/MxYr6v+D0yezuJ2xm54YcC0UvSqrut4SNqFrGG6g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>, 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.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Fri, 10 Oct 2025 09:22:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHcOcdRAbW7d3bUAUGKbidrnjC6RA==
  • Thread-topic: [PATCH v3 5/5] docs: Document CPU hotplug

Signed-off-by: Mykyta Poturai <mykyta_poturai@xxxxxxxx>

v2->v3:
* patch introduced
---
 docs/misc/cpu-hotplug.txt | 51 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 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..f2b340d2ae
--- /dev/null
+++ b/docs/misc/cpu-hotplug.txt
@@ -0,0 +1,51 @@
+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 supported 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 core 0. Sysctl
+calls are routed to core 0 before doing any actual up/down operations on other
+cores.
+
+Configuration
+-------------
+
+Sysctl handlers are enabled unconditionally on supported architectures. 
Building
+of the userspace tool "hptool" is controlled by the "hptool" flag in the
+configure script. It is enabled by default and can be disabled with
+--disable-hptool command line option.
+
+Usage
+-----
+
+Disable core:
+
+$ xen-hptool cpu-offline 2
+Prepare to offline CPU 2
+(XEN) Removing cpu 2 from runqueue 0
+CPU 2 offlined successfully
+
+Enable core:
+
+$ xen-hptool cpu-online 2
+Prepare to online CPU 2
+(XEN) Bringing up CPU2
+(XEN) GICv3: CPU2: Found redistributor in region 0 @00000a004005c000
+(XEN) CPU2: Guest atomics will try 1 times before pausing the domain
+(XEN) CPU 2 booted.
+(XEN) Adding cpu 2 to runqueue 0
+CPU 2 onlined successfully
+
-- 
2.34.1



 


Rackspace

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