|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v1 3/4] arm/sysctl: Implement cpu hotplug ops
Hi Mykyta, On 23/09/2025 14:37, Mykyta Poturai wrote: On 18.09.25 16:35, Julien Grall wrote:Hi Mykyta, On 18/09/2025 13:16, Mykyta Poturai wrote:Implement XEN_SYSCTL_CPU_HOTPLUG_* calls to allow for enabling/disabling CPU cores in runtime. Signed-off-by: Mykyta Poturai <mykyta_poturai@xxxxxxxx> --- xen/arch/arm/sysctl.c | 67 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/xen/arch/arm/sysctl.c b/xen/arch/arm/sysctl.c index 32cab4feff..ca8fb550fd 100644 --- a/xen/arch/arm/sysctl.c +++ b/xen/arch/arm/sysctl.c @@ -12,6 +12,7 @@ #include <xen/dt-overlay.h> #include <xen/errno.h> #include <xen/hypercall.h> +#include <xen/cpu.h> #include <asm/arm64/sve.h> #include <public/sysctl.h> @@ -23,6 +24,68 @@ void arch_do_physinfo(struct xen_sysctl_physinfo *pi)XEN_SYSCTL_PHYSCAP_ARM_SVE_MASK); I have replied to Jan. In short, the clarify you are referring is what would make more difficult to support offlining CPU0. So I would rather prefer if they are not present. + return continue_hypercall_on_cpu(0, cpu_up_helper, _p(hotplug->cpu)); + + case XEN_SYSCTL_CPU_HOTPLUG_OFFLINE: + if ( hotplug->cpu == 0 ) + return -EINVAL; + return continue_hypercall_on_cpu(0, cpu_down_helper, _p(hotplug->cpu)); + + case XEN_SYSCTL_CPU_HOTPLUG_SMT_ENABLE: + case XEN_SYSCTL_CPU_HOTPLUG_SMT_DISABLE:Why are we implementing those helpers on Arm? It will not work properly on arm32 because of the page table code. We have per-CPU pagetables (see init_domheap_mappings()) and they will need to be freed. Note this is not a request to add support for arm32 CPU offlining. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |