[RFC PATCH v1] xen: arm: Set state to SYS_STATE_smp_boot before smp initialization

Ayan Kumar Halder posted 1 patch 1 year, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20240320185455.3409182-1-ayan.kumar.halder@amd.com
xen/arch/arm/setup.c | 2 ++
1 file changed, 2 insertions(+)
[RFC PATCH v1] xen: arm: Set state to SYS_STATE_smp_boot before smp initialization
Posted by Ayan Kumar Halder 1 year, 10 months ago
This is similar to what is being done on x86.

Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
---
 xen/arch/arm/setup.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 424744ad5e..3d110685bc 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -787,6 +787,8 @@ void asmlinkage __init start_xen(unsigned long boot_phys_offset,
 
     processor_id();
 
+    system_state = SYS_STATE_smp_boot;
+
     smp_init_cpus();
     nr_cpu_ids = smp_get_max_cpus();
     printk(XENLOG_INFO "SMP: Allowing %u CPUs\n", nr_cpu_ids);
-- 
2.25.1
Re: [RFC PATCH v1] xen: arm: Set state to SYS_STATE_smp_boot before smp initialization
Posted by Julien Grall 1 year, 8 months ago
Hi Ayan,

Sorry this patch fell through the cracks.

On 20/03/2024 18:54, Ayan Kumar Halder wrote:
> This is similar to what is being done on x86.


OOI, how did you find this issue?

> 
> Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>


> ---
>   xen/arch/arm/setup.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
> index 424744ad5e..3d110685bc 100644
> --- a/xen/arch/arm/setup.c
> +++ b/xen/arch/arm/setup.c
> @@ -787,6 +787,8 @@ void asmlinkage __init start_xen(unsigned long boot_phys_offset+
>   
>       processor_id();
>   
> +    system_state = SYS_STATE_smp_boot;
> +

This is not quite the samem position as x86. The system state will be 
updated just before do_presmp_initcalls().

Can you explain the difference?

Cheers,

-- 
Julien Grall