From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Smm9R-0001Bh-Ih for qemu-devel@nongnu.org; Thu, 05 Jul 2012 09:31:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Smm9L-0005Hd-DE for qemu-devel@nongnu.org; Thu, 05 Jul 2012 09:31:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Smm9L-0005H0-5A for qemu-devel@nongnu.org; Thu, 05 Jul 2012 09:31:15 -0400 Message-ID: <4FF59717.2030901@redhat.com> Date: Thu, 05 Jul 2012 15:31:03 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1341110730-444-1-git-send-email-proljc@gmail.com> <1341110730-444-2-git-send-email-proljc@gmail.com> <4FF5951F.9060502@suse.de> In-Reply-To: <4FF5951F.9060502@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v8 01/16] target-or32: Add target stubs and QOM cpu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Cc: Juan Quintela , Jia Liu , qemu-devel@nongnu.org Il 05/07/2012 15:22, Andreas F=C3=A4rber ha scritto: >> > +static void openrisc_any_initfn(Object *obj) >> > +{ >> > + OpenRISCCPU *cpu =3D OPENRISC_CPU(obj); >> > + >> > + set_feature(cpu, OPENRISC_FEATURE_OB32S); >> > + set_feature(cpu, OPENRISC_FEATURE_OF32S); >> > + >> > + cpu_reset(CPU(cpu)); >> > +} > Paolo, could class_base_init or something help with this pattern of > needing to do something in every derived initfn? I guess what you're looking for is some instance_post_init that is called at init time after instance_init? > On the other hand I think we should move cpu_reset() into the realizefn > instead, that would avoid this issue here. Yep. Paolo