diff options
author | Andreas Färber <afaerber@suse.de> | 2012-04-02 11:39:23 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-04-04 17:29:23 +0200 |
commit | 29e4bcb26b80f975920508c83a9f24f29eb6bc1a (patch) | |
tree | 1b2a133086a32ebcb1b54d0cfa967a74cda2aa7d /target-s390x/helper.c | |
parent | f05f6b4adb4db3affb0cdd17383b0a7e905e66e1 (diff) | |
download | qemu-29e4bcb26b80f975920508c83a9f24f29eb6bc1a.zip qemu-29e4bcb26b80f975920508c83a9f24f29eb6bc1a.tar.gz qemu-29e4bcb26b80f975920508c83a9f24f29eb6bc1a.tar.bz2 |
target-s390x: QOM'ify CPU
Embed CPUS390XState as first member of S390CPU.
Since -cpu is being ignored, make TYPE_S390_CPU non-abstract.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'target-s390x/helper.c')
-rw-r--r-- | target-s390x/helper.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target-s390x/helper.c b/target-s390x/helper.c index 44d5048..ae57ab3 100644 --- a/target-s390x/helper.c +++ b/target-s390x/helper.c @@ -70,6 +70,7 @@ static void s390x_cpu_timer(void *opaque) CPUS390XState *cpu_s390x_init(const char *cpu_model) { + S390CPU *cpu; CPUS390XState *env; #if !defined (CONFIG_USER_ONLY) struct tm tm; @@ -77,7 +78,8 @@ CPUS390XState *cpu_s390x_init(const char *cpu_model) static int inited = 0; static int cpu_num = 0; - env = g_malloc0(sizeof(CPUS390XState)); + cpu = S390_CPU(object_new(TYPE_S390_CPU)); + env = &cpu->env; cpu_exec_init(env); if (tcg_enabled() && !inited) { inited = 1; |