From 71b12d31971751f46c546d693c1e216f38ba2053 Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Thu, 5 May 2011 09:29:57 +0200 Subject: [PATCH] s390x: fix smp support for kvm Currently smp support for kvm does not work. Qemu does a kvm run even on secondary CPUs which dont have a sane state (initial psw == 0) triggering some program faults. Architecturally these cpus are in the stopped state, so we should not do the kvm run ioctl. (these CPUs will be started by a SIGP restart later during the boot process) We need to tell the loop that this cpu should not run. Jan Kiszka pointed out that kvm_arch_process_async_events is the right place to do. Signed-off-by: Christian Borntraeger Signed-off-by: Alexander Graf --- target-s390x/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 2643460722..315569313c 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -179,7 +179,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; } void kvm_s390_interrupt_internal(CPUState *env, int type, uint32_t parm, -- 2.11.4.GIT