aboutsummaryrefslogtreecommitdiff
path: root/target-s390x/cpu.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2014-08-28 13:58:52 +0200
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-09-01 09:23:02 +0200
commit159855f098489160df9cb13ce1667a4d6dd76895 (patch)
tree783587b25ea7fccd6bae32ceb531f1269d33d47d /target-s390x/cpu.c
parent1fad8b3be32c2e91acbd55f2b0af57ed0723b1bb (diff)
s390x/kvm: execute the first cpu reset on the vcpu thread
As all full cpu resets currently call into the kernel to do initial cpu reset, let's run this reset (triggered by cpu_s390x_init()) on the proper vcpu thread. Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'target-s390x/cpu.c')
-rw-r--r--target-s390x/cpu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
index 4633282764..505a2fa3da 100644
--- a/target-s390x/cpu.c
+++ b/target-s390x/cpu.c
@@ -175,7 +175,11 @@ static void s390_cpu_realizefn(DeviceState *dev, Error **errp)
S390CPUClass *scc = S390_CPU_GET_CLASS(dev);
qemu_init_vcpu(cs);
+#if !defined(CONFIG_USER_ONLY)
+ run_on_cpu(cs, s390_do_cpu_full_reset, cs);
+#else
cpu_reset(cs);
+#endif
scc->parent_realize(dev, errp);
}