vl: Ensure the cpu_synchronize_all_post_init() in the appropriate location
PATCH v2 1/1 vl: Ensure the cpu_synchronize_all_post_init() in the appropriate location
At the Qemu initialization, we call the cpu_synchronize_all_post_init() to synchronize All CPU states to KVM in the ./vl.c::main().
Currently, it is called before we initialize the CPUs, which created by "-device" command, So, these CPUs may be ignored to synchronize.
The patch moves the numa_post_machine_init func in the appropriate location to make sure that all the CPUs has already been created when it is called.
---
Change log v1-> v2:
1. Split it from
https://lists.nongnu.org/archive/html/qemu-devel/2017-01/msg03354.html
2. Rewrite the log.
vl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
vl.c +3 -2
@@ -4547,8 +4547,6 @@ int main(int argc, char **argv, char **envp)audio_init (); -cpu_synchronize_all_post_init (); -numa_post_machine_init (); if (qemu_opts_foreach(qemu_find_opts("fw_cfg"),
@@ -4571,6 +4569,9 @@ int main(int argc, char **argv, char **envp) device_init_func, NULL, NULL)) {exit (1 ); } + +cpu_synchronize_all_post_init (); +rom_reset_order_override ();/* Did we create any drives that we failed to create a device for? */
Signature · 1 line
2.5.5
Quoted 9 lines · Dou Liyang
At the Qemu initialization, we call the
cpu_synchronize_all_post_init()to synchronize All CPU states to KVM in the ./vl.c::main().Currently, it is called before we initialize the CPUs, which created by "-device" command, So, these CPUs may be ignored to synchronize.
The patch moves the
numa_post_machine_initfunc in the appropriate location to make sure that all the CPUs has already been created when it is called.
This doesn't match what the patch does (the function is cpu_synchronise_all_post_init) but I see another patch is already merged that moved the NUMA one.
I'm afraid you'll need to re-base anyway because it no longer applies cleanly.
Quoted 26 lines
Signed-off-by Dou Liyang <[email protected]>---
Change log v1-> v2:
1. Split it from
https://lists.nongnu.org/archive/html/qemu-devel/2017-01/msg03354.html
2. Rewrite the log.vl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)vl.c +0
-2@@ -4547,8 +4547,6 @@ int main(int argc, char **argv, char **envp)audio_init (); -cpu_synchronize_all_post_init (); -numa_post_machine_init (); if (qemu_opts_foreach(qemu_find_opts("fw_cfg"),
vl.c int main(int argc, char **argv, char **envp) · line 4577
Quoted 9 lines
vl.c +3
-0@@ -4571,6 +4569,9 @@ int main(int argc, char **argv, char **envp) device_init_func, NULL, NULL)) {exit (1 ); } + +cpu_synchronize_all_post_init (); +rom_reset_order_override ();/* Did we create any drives that we failed to create a device for? */
--
Alex Bennée
Hi, Alex
Sorry for late reply.
Quoted 9 lines · Alex Bennée
Quoted 6 lines · Dou Liyang
At the Qemu initialization, we call the
cpu_synchronize_all_post_init()to synchronize All CPU states to KVM in the ./vl.c::main().Currently, it is called before we initialize the CPUs, which created by "-device" command, So, these CPUs may be ignored to synchronize.
Quoted 8 lines
Quoted 3 lines
The patch moves the
numa_post_machine_initfunc in the appropriate location to make sure that all the CPUs has already been created when it is called.This doesn't match what the patch does (the function is
cpu_synchronise_all_post_init) but I see another patch is already merged that moved the NUMA one.
Oops, Yes, I make the mistake.
Quoted 3 lines
I'm afraid you'll need to re-base anyway because it no longer applies cleanly.
Yes, I will re-base it.
Thanks,
Liyang
Quoted 43 lines
Quoted 27 lines
Signed-off-by Dou Liyang <[email protected]>---
Change log v1-> v2:
1. Split it from
https://lists.nongnu.org/archive/html/qemu-devel/2017-01/msg03354.html
2. Rewrite the log.vl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)vl.c +0
-2@@ -4547,8 +4547,6 @@ int main(int argc, char **argv, char **envp)audio_init (); -cpu_synchronize_all_post_init (); -numa_post_machine_init (); if (qemu_opts_foreach(qemu_find_opts("fw_cfg"),vl.c int main(int argc, char **argv, char **envp) · line 4577
Quoted 9 lines
vl.c +3
-0@@ -4571,6 +4569,9 @@ int main(int argc, char **argv, char **envp) device_init_func, NULL, NULL)) {exit (1 ); } + +cpu_synchronize_all_post_init (); +rom_reset_order_override ();/* Did we create any drives that we failed to create a device for? */ --
Alex Bennée