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

Re: [PATCH v4 6/8] arm/sysctl: Implement cpu hotplug ops


  • To: Grygorii Strashko <grygorii_strashko@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
  • Date: Fri, 21 Nov 2025 16:12:42 +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=k23mqt9vGiQn+5NT+svvRsKuhNjONLrhUic2jPaETTQ=; b=h3y1MqSI1Z35hWott7pye27uudnZ0idaMqCmjWhwzz7KgQqeRd01mwiyyfQZs3kDLySEPLrU4eGSNJX7qqcyTP+vHDb9LF+GagFnhE6agO21o/8CWjiaG1UKRaZYsCxNkz5d/sRbhbiqY6/6kXKR8dV5KRo7kwLG2uN9Fsm/mXp82Zx/nC/QBrI/JvkOvf26aVTdVvmjxfkjpckbnzI5D5NHxzGJRI7eE/qdL5tDSDfWTidWlZ+qBYplV0ypA0IseySnN9TFs4lU9MhbXmlE73O3cY0dqOoCceC2i9Tf0elNgaF3nsF2n0ATp3nXXZazSWDmPMxGX+BtsfrZhr7vyg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ROesC2/q/m8RCU1W8EkL5mR/LBvcapiKrR17/T9zFjHSMk/gK0S1o7P2B2l117rlDAPZpkhYk1QBrN1HBMqnmJ0yxg1XLoAf9O9aLfnCjFWm0kiX9UZNr5pPlLDOgoABOR/IQIW0zCsf+JKsIdn/asnHRWb7I4qMgdJJFJQIjqgpzkFUFOGJJ3CtiJXI/7yVf3jwVmTPFokvO4gzT8WocJA80Qm/4yFne1DKKVLKjju+2JDOoZynqKRUoi1zZCwqR2RkDiic/tnYvmf7XBpi4Mzect89wnQzLUkrZIsTwk00e5Qhf1BxXuWwwLY4cxcTXTIqnG5+/9yVkeXrAc05jA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, "Alejandro.GarciaVallejo@xxxxxxx" <Alejandro.GarciaVallejo@xxxxxxx>
  • Delivery-date: Fri, 21 Nov 2025 16:13:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHcU8JY4MUEJP5v5ECe3RrLj+fwX7TwwqoAgAyZJQA=
  • Thread-topic: [PATCH v4 6/8] arm/sysctl: Implement cpu hotplug ops

On 13.11.25 17:49, Grygorii Strashko wrote:
> 
> 
> On 12.11.25 12:51, Mykyta Poturai wrote:
>> Implement XEN_SYSCTL_CPU_HOTPLUG_{ONLINE,OFFLINE} calls to allow for
>> enabling/disabling CPU cores in runtime.
>>
>> For now this operations only support Arm64. For proper Arm32 support,
>> there needs to be a mechanism to free per-cpu page tables, allocated in
>> init_domheap_mappings.
>> Also, hotplug is not supported if ITS, FFA, or TEE is enabled, as they
>> use non-static IRQ actions.
>>
>> Create a Kconfig option RUNTIME_CPU_CONTROL that reflects this
>> constraints.
>>
>> Signed-off-by: Mykyta Poturai <mykyta_poturai@xxxxxxxx>
>>
>> v3->v4:
>> * don't reimplement cpu_up/down helpers
>> * add Kconfig option
>> * fixup formatting
>>
>> v2->v3:
>> * no changes
>>
>> v1->v2:
>> * remove SMT ops
>> * remove cpu == 0 checks
>> * add XSM hooks
>> * only implement for 64bit Arm
>> ---
>>   xen/arch/arm/Kconfig  |  4 ++++
>>   xen/arch/arm/sysctl.c | 32 ++++++++++++++++++++++++++++++++
>>   2 files changed, 36 insertions(+)
>>
>> diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
>> index cf6af68299..931ae51575 100644
>> --- a/xen/arch/arm/Kconfig
>> +++ b/xen/arch/arm/Kconfig
>> @@ -274,6 +274,10 @@ config PCI_PASSTHROUGH
>>       help
>>         This option enables PCI device passthrough
>> +config RUNTIME_CPU_CONTROL
>> +    def_bool y
>> +    depends on ARM_64 && !TEE && !FFA && !HAS_ITS
>> +
> 
> Having it in arch code I think right as Arch can have own deps
> (Linux does it this way), but name has to be fixed and documented (docs).
> 
> may be more common name HOTPLUG_CPU (like in linux)?
> naming is up to you.
> 

I will change the config name to "CPU_HOTPLUG" in the next version if 
everyone is okay with that.


-- 
Mykyta

 


Rackspace

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