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

[Xen-devel] [PATCH v1 1/2] system_state: introduce SYS_STATE_smp_booted



The new state means that all secondary CPUs are up. On x86 this also
means that a microcode was (potentially) updated on all CPUs.

On ARM side of things, additionally set system_state to SYS_STATE_smp_boot
just before bringing up secondary CPUs.

Signed-off-by: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx>
---
 xen/arch/arm/setup.c     | 4 ++++
 xen/arch/x86/setup.c     | 2 ++
 xen/include/xen/kernel.h | 1 +
 3 files changed, 7 insertions(+)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index e83221ab79..21baee534e 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -915,6 +915,8 @@ void __init start_xen(unsigned long boot_phys_offset,
 
     console_init_postirq();
 
+    system_state = SYS_STATE_smp_boot;
+
     do_presmp_initcalls();
 
     for_each_present_cpu ( i )
@@ -930,6 +932,8 @@ void __init start_xen(unsigned long boot_phys_offset,
     printk("Brought up %ld CPUs\n", (long)num_online_cpus());
     /* TODO: smp_cpus_done(); */
 
+    system_state = SYS_STATE_smp_booted;
+
     setup_virt_paging();
 
     iommu_setup();
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 9cbff22fb3..189481608d 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1683,6 +1683,8 @@ void __init noreturn __start_xen(unsigned long mbi_p)
         }
     }
 
+    system_state = SYS_STATE_smp_booted;
+
     printk("Brought up %ld CPUs\n", (long)num_online_cpus());
     if ( num_parked )
         printk(XENLOG_INFO "Parked %u CPUs\n", num_parked);
diff --git a/xen/include/xen/kernel.h b/xen/include/xen/kernel.h
index 548b64da9f..bbf255943f 100644
--- a/xen/include/xen/kernel.h
+++ b/xen/include/xen/kernel.h
@@ -93,6 +93,7 @@ extern enum system_state {
     SYS_STATE_early_boot,
     SYS_STATE_boot,
     SYS_STATE_smp_boot,
+    SYS_STATE_smp_booted,
     SYS_STATE_active,
     SYS_STATE_suspend,
     SYS_STATE_resume
-- 
2.17.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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