kvm-ppc: halt secondary cpus when guest reset

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 157feeadba)
This commit is contained in:
Liu Yu-B13201 2011-11-28 20:41:18 +00:00 committed by Alexander Graf
parent 57ee5f77c0
commit adf6c527b0
2 changed files with 2 additions and 1 deletions

View File

@ -112,6 +112,7 @@ static void spin_kick(void *data)
env->halted = 0; env->halted = 0;
env->exception_index = -1; env->exception_index = -1;
env->stopped = 0;
qemu_cpu_kick(env); qemu_cpu_kick(env);
} }

View File

@ -504,7 +504,7 @@ void kvm_arch_post_run(CPUState *env, struct kvm_run *run)
int kvm_arch_process_async_events(CPUState *env) int kvm_arch_process_async_events(CPUState *env)
{ {
return 0; return env->halted;
} }
static int kvmppc_handle_halt(CPUState *env) static int kvmppc_handle_halt(CPUState *env)