]> xenbits.xensource.com Git - qemu-upstream-4.3-testing.git/commitdiff
kvm-ppc: halt secondary cpus when guest reset
authorLiu Yu-B13201 <Yu.Liu@freescale.com>
Mon, 28 Nov 2011 20:41:18 +0000 (20:41 +0000)
committerAlexander Graf <agraf@suse.de>
Thu, 12 Jan 2012 17:30:50 +0000 (18:30 +0100)
When guest reset, we need to halt secondary cpus until guest kick them.
This already works for tcg. The patch add the support for kvm.

Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
[agraf: remove in-kernel irqchip code]
(cherry picked from commit 157feeadbaec09fe4dca539a24f6f6d327d6eeb6)

hw/ppce500_spin.c
target-ppc/kvm.c

index cccd94073abc073a5d484364712a60ed169eb6b6..2b527282b6f29888c8fea8a017236e6a9cb4335e 100644 (file)
@@ -112,6 +112,7 @@ static void spin_kick(void *data)
 
     env->halted = 0;
     env->exception_index = -1;
+    env->stopped = 0;
     qemu_cpu_kick(env);
 }
 
index 429349fb94b78c7da45934195926ad7e393fd9cc..9b2e605b678184ff76a4c0d6653179a5e8f55f77 100644 (file)
@@ -504,7 +504,7 @@ void kvm_arch_post_run(CPUState *env, struct kvm_run *run)
 
 int kvm_arch_process_async_events(CPUState *env)
 {
-    return 0;
+    return env->halted;
 }
 
 static int kvmppc_handle_halt(CPUState *env)