From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvLcv-0003d4-Mu for qemu-devel@nongnu.org; Wed, 16 Jan 2013 00:33:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvLcs-00082f-04 for qemu-devel@nongnu.org; Wed, 16 Jan 2013 00:33:29 -0500 Received: from cantor2.suse.de ([195.135.220.15]:59599 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvLcr-00082U-PC for qemu-devel@nongnu.org; Wed, 16 Jan 2013 00:33:25 -0500 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 16 Jan 2013 06:32:56 +0100 Message-Id: <1358314380-9400-12-git-send-email-afaerber@suse.de> In-Reply-To: <1358314380-9400-1-git-send-email-afaerber@suse.de> References: <1358314380-9400-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [RFC qom-cpu 11/15] target-s390x: Introduce QOM realizefn for S390CPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexander Graf , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Richard Henderson Introduce realizefn and set realized =3D true in cpu_s390x_init(). Signed-off-by: Andreas F=C3=A4rber --- target-s390x/cpu.c | 10 ++++++++++ target-s390x/helper.c | 4 +++- 2 Dateien ge=C3=A4ndert, 13 Zeilen hinzugef=C3=BCgt(+), 1 Zeile entfernt= (-) diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c index 2ed2312..94d8d93 100644 --- a/target-s390x/cpu.c +++ b/target-s390x/cpu.c @@ -45,6 +45,13 @@ static void s390_cpu_reset(CPUState *s) s390_add_running_cpu(env); } =20 +static void s390_cpu_realizefn(DeviceState *dev, Error **errp) +{ + S390CPU *cpu =3D S390_CPU(dev); + + qemu_init_vcpu(&cpu->env); +} + static void s390_cpu_initfn(Object *obj) { S390CPU *cpu =3D S390_CPU(obj); @@ -73,6 +80,9 @@ static void s390_cpu_class_init(ObjectClass *oc, void *= data) { S390CPUClass *scc =3D S390_CPU_CLASS(oc); CPUClass *cc =3D CPU_CLASS(scc); + DeviceClass *dc =3D DEVICE_CLASS(oc); + + dc->realize =3D s390_cpu_realizefn; =20 scc->parent_reset =3D cc->reset; cc->reset =3D s390_cpu_reset; diff --git a/target-s390x/helper.c b/target-s390x/helper.c index 9a132e6..45020b2 100644 --- a/target-s390x/helper.c +++ b/target-s390x/helper.c @@ -85,7 +85,9 @@ S390CPU *cpu_s390x_init(const char *cpu_model) } =20 env->cpu_model_str =3D cpu_model; - qemu_init_vcpu(env); + + object_property_set_bool(OBJECT(cpu), true, "realized", NULL); + return cpu; } =20 --=20 1.7.10.4