From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rupe2-0007uP-3e for qemu-devel@nongnu.org; Tue, 07 Feb 2012 13:20:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rupdw-00060L-PU for qemu-devel@nongnu.org; Tue, 07 Feb 2012 13:19:58 -0500 Received: from cantor2.suse.de ([195.135.220.15]:52877 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rupdw-0005zo-Hf for qemu-devel@nongnu.org; Tue, 07 Feb 2012 13:19:52 -0500 Message-ID: <4F316AB8.1060207@suse.de> Date: Tue, 07 Feb 2012 19:17:28 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <87ehu7pxvf.fsf@elfo.elfo> <4F312AFC.6020908@suse.de> <4F3166EC.7000002@codemonkey.ws> In-Reply-To: <4F3166EC.7000002@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] KVM call agenda for Tuesday 7 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Developers qemu-devel , KVM devel mailing list , quintela@redhat.com Am 07.02.2012 19:01, schrieb Anthony Liguori: > On 02/07/2012 07:45 AM, Andreas F=E4rber wrote: >> http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg04065.html >> >> How is the realize step (DeviceState::init) supposed to translate to >> Object-derived classes (e.g., CPU) and where to draw the line between >> initfn and realize. >=20 > Realize probably should be folded into Object or some intermediate obje= ct. >=20 > The idea is that there will be a realized boolean property. When the > level changes, it will invoke a realize() or unrealize() method > depending on the direction. DeviceState will implement realize() and > invoke init(). For unrealize(), it will invoke exit(). That's fine. Question is, who is in charge of setting the realized property and some rules of what do we put in initfn and what in realize. Take the CPU, should CPU reset be done in realize or initfn? realize might overwrite values set by the user after initfn but would provide us with a reproducible state wrt reboot. Starting the VCPU thread would definitely be for realize, but currently this is all done from cpu_*_init() and having sequential calls to initfn and realize doesn't offer any advantage over doing it all in initfn. So given we do the split, who knows about these objects to call their realize function? Will there be some global QOM logic that calls realize on all objects instantiated so far (any ordering constraints then?) or is everyone themselves responsible for making this work, i.e. must I keep a global list of all CPUs initfn'ed to have their realize method called later? Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg