diff mbox series

[RFC,10/26] softmmu: Add cpu_synchronize_without_aux_post_init

Message ID 20210302204822.81901-11-dovmurik@linux.vnet.ibm.com (mailing list archive)
State New, archived
Headers show
Series Confidential guest live migration | expand

Commit Message

Dov Murik March 2, 2021, 8:48 p.m. UTC
This will be used during migration on the target.

Signed-off-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
---
 include/sysemu/cpus.h |  1 +
 softmmu/cpus.c        | 11 +++++++++++
 2 files changed, 12 insertions(+)
diff mbox series

Patch

diff --git a/include/sysemu/cpus.h b/include/sysemu/cpus.h
index 868f1192de..dc24e38254 100644
--- a/include/sysemu/cpus.h
+++ b/include/sysemu/cpus.h
@@ -46,6 +46,7 @@  bool cpus_are_resettable(void);
 void cpu_synchronize_all_states(void);
 void cpu_synchronize_all_post_reset(void);
 void cpu_synchronize_all_post_init(void);
+void cpu_synchronize_without_aux_post_init(void);
 void cpu_synchronize_all_pre_loadvm(void);
 
 #ifndef CONFIG_USER_ONLY
diff --git a/softmmu/cpus.c b/softmmu/cpus.c
index 878cf2a421..68fa4639a7 100644
--- a/softmmu/cpus.c
+++ b/softmmu/cpus.c
@@ -157,6 +157,17 @@  void cpu_synchronize_all_post_init(void)
     }
 }
 
+void cpu_synchronize_without_aux_post_init(void)
+{
+    CPUState *cpu;
+
+    CPU_FOREACH(cpu) {
+        if (!cpu->aux) {
+            cpu_synchronize_post_init(cpu);
+        }
+    }
+}
+
 void cpu_synchronize_all_pre_loadvm(void)
 {
     CPUState *cpu;