[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 0/5] Implement CPU hotplug on Arm
- To: Mykola Kvach <xakep.amatop@xxxxxxxxx>
- From: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
- Date: Mon, 20 Oct 2025 14:15:23 +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=Ped0LGid1UcTE8vxOQhB6FJi6aLME1fw+i0UV6KNi38=; b=m7qbQBNDorxFNPs48ebtLqilBysQwue4FuqIdeDszwNO4CwmQ9Zcoik8ug+MT2g0eJFTJk8Y49Q8fG9gJRAjpgOm0ijjitmrm1puzKtgxb5y4/OJLtANGJkB4DficG8GIR2/Jc8V+UGCnOK9QxbiT72C1KVf6weO3eW7q7j7ZAdNFprCpeA1Dj1rs/SQo1l0nFl6T0Qz5Ke33J8hsDYFdfPkjMRJo65xYIWYbGgY/kdbAYp5cIV8HEz3w3I7Qxq2smzWEcHYQtTVYKsbdEK00wjcmGLMzvYdBz6jwtgI59VDjb+9XcV84kX6FnYpuu/MYAV7GCKqpYlyb3LyBYRB/A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tV4Qm8UvFYKwitFXmMzfAg97ctfyxalx0N8ddq631IOW+C6Uq+xCroTXYhmBut4Q1rzqAGjT6br7iGfW+7Iu1JRGkyR8G+Vmtb/myW1hPGwBmVYbzyZCqcDIDN6ZMdfGOUYxecvoPxRhYZGc7HZnCPtZWpAovfwmdCbQJ6nfA75uIt4KQDx+3a09XkaHOoRahc24yUmuO9D6JB4cKqwT3gnKrmfpwtryyU6kYb5Ussf7Hdgq5VabnVDY3MNhTAIuKcStdEU0JZhcLtuaOcIzLsLhxBpFRIYPf3OFFTfGsEEzeClbnWYi1rv72Dzd1bQE+oo/+ceTbujdPKNng6Ym5g==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, 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>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Mon, 20 Oct 2025 14:15:43 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHcOcdPI3ki3mxsgkWwwomwd2VOcrTDfxsAgAelSIA=
- Thread-topic: [PATCH v3 0/5] Implement CPU hotplug on Arm
On 15.10.25 20:30, Mykola Kvach wrote:
> Hi Mykyta,
>
> Thanks for the series.
>
> It seems there might be issues here -- please take a look and let me
> know if my concerns are valid:
>
> 1. FF-A notification IRQ: after a CPU down->up cycle the IRQ
> configuration may be lost.
OPTEE and FFA are marked as unsupported.
> 2. GICv3 LPIs: a CPU may fail to come back up unless its LPI pending
> table exists (is allocated) on bring-up. See
> gicv3_lpi_allocate_pendtable() and its call chain.
ITS is marked as unsupported. I have a plan to deal with this, but it is
out of scope of this series.
> 3. IRQ migration on CPU down: if an IRQ targets a CPU being offlined,
> its affinity should be moved to an online CPU before completing the
> offlining.
All guest tied IRQ migration is handled by the scheduler. Regarding the
irqs used by Xen, I didn't find any with affinity to other CPUs than CPU
0, which can't be disabled. I think theoretically it is possible for
them to have different affinity, but it seems unlikely considering that
x86 hotplug code also doesn't seem to do any Xen irq migration AFAIU.
> 4. Race between the new hypercalls and disable/enable_nonboot_cpus():
> disable_nonboot_cpus is called, enable_nonboot_cpus() reads
> frozen_cpus, and before it calls cpu_up() a hypercall onlines the CPU.
> cpu_up() then fails as "already online", but the CPU_RESUME_FAILED
> path may still run for an already-online CPU, risking use-after-free
> of per-CPU state (e.g. via free_percpu_area()) and other issues
> related to CPU_RESUME_FAILED notification.
>
There don't seem to be any calls to disable/enable_nonboot_cpus() on
Arm. If we take x86 as an example, then they are called with all domains
already paused, and I don't see how paused domains can issue hypercalls.
>
> Best regards,
> Mykola
--
Mykyta
|