From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaQdW-0001Au-Uh for qemu-devel@nongnu.org; Tue, 13 Dec 2011 06:35:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RaQdR-0000BU-M3 for qemu-devel@nongnu.org; Tue, 13 Dec 2011 06:35:06 -0500 Received: from mail-ww0-f53.google.com ([74.125.82.53]:63890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaQdR-0000AG-GU for qemu-devel@nongnu.org; Tue, 13 Dec 2011 06:35:01 -0500 Received: by wgbds1 with SMTP id ds1so12523922wgb.10 for ; Tue, 13 Dec 2011 03:35:00 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <4EE657AC.7080908@codemonkey.ws> References: <4EE657AC.7080908@codemonkey.ws> Date: Tue, 13 Dec 2011 11:35:00 +0000 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC] QEMU Object Model status/merge plan List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Kevin Wolf , Peter Maydell , Stefan Hajnoczi , qemu-devel , Markus Armbruster , Avi Kivity , Paolo Bonzini , Gerd Hoffmann On Mon, Dec 12, 2011 at 7:36 PM, Anthony Liguori wr= ote: > I choose the serial device to showcase what we'll eventually be able to d= o. > =A0The three relevant files are: > > https://github.com/aliguori/qemu/blob/qom-next/hw/isa-serial.c > > https://github.com/aliguori/qemu/blob/qom-next/hw/mm-serial.c > > https://github.com/aliguori/qemu/blob/qom-next/hw/serial.c I'm not sure I understand how init functions are called for derived classes. On one hand mm-serial.c calls its superclass init function, on the other hand isa-bus.c:isa_qdev_init() calls an init function that its child class must provide. One is calling its parent, the other is calling its child. Is there a consistent way of doing this and what did I miss :)? Stefan