aboutsummaryrefslogtreecommitdiff
path: root/target-s390x/cpu.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-04-02 13:31:59 +0200
committerAndreas Färber <afaerber@suse.de>2012-04-04 17:34:44 +0200
commit1ac1a7499bcb44174735780e0bd0421a1ac7a323 (patch)
treeca89f635c9bf4f7411e99ee7503c24a11cd19525 /target-s390x/cpu.c
parent29e4bcb26b80f975920508c83a9f24f29eb6bc1a (diff)
target-s390x: QOM'ify CPU reset
Move code from cpu_state_reset() to s390_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'target-s390x/cpu.c')
-rw-r--r--target-s390x/cpu.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
index 94320f241b..cae0b1894d 100644
--- a/target-s390x/cpu.c
+++ b/target-s390x/cpu.c
@@ -1,6 +1,8 @@
/*
* QEMU S/390 CPU
*
+ * Copyright (c) 2009 Ulrich Hecht
+ * Copyright (c) 2011 Alexander Graf
* Copyright (c) 2012 SUSE LINUX Products GmbH
*
* This library is free software; you can redistribute it and/or
@@ -23,15 +25,24 @@
#include "qemu-timer.h"
+/* CPUClass::reset() */
static void s390_cpu_reset(CPUState *s)
{
S390CPU *cpu = S390_CPU(s);
S390CPUClass *scc = S390_CPU_GET_CLASS(cpu);
CPUS390XState *env = &cpu->env;
+ if (qemu_loglevel_mask(CPU_LOG_RESET)) {
+ qemu_log("CPU Reset (CPU %d)\n", env->cpu_index);
+ log_cpu_state(env, 0);
+ }
+
scc->parent_reset(s);
- cpu_state_reset(env);
+ memset(env, 0, offsetof(CPUS390XState, breakpoints));
+ /* FIXME: reset vector? */
+ tlb_flush(env, 1);
+ s390_add_running_cpu(env);
}
static void s390_cpu_class_init(ObjectClass *oc, void *data)