From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjXNP-0002jn-Qj for qemu-devel@nongnu.org; Fri, 14 Dec 2012 10:40:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjXNO-000342-FK for qemu-devel@nongnu.org; Fri, 14 Dec 2012 10:40:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjXNO-00033y-86 for qemu-devel@nongnu.org; Fri, 14 Dec 2012 10:40:38 -0500 Message-ID: <50CB4851.6040208@redhat.com> Date: Fri, 14 Dec 2012 16:40:01 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1354726153-30264-1-git-send-email-ehabkost@redhat.com> <1354726153-30264-9-git-send-email-ehabkost@redhat.com> <50C887D0.7050704@suse.de> <20121212135901.GD3236@otherpad.lan.raisama.net> <20121212152724.7693d277@nial.usersys.redhat.com> <50CB45CF.5000709@suse.de> In-Reply-To: <50CB45CF.5000709@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 8/8] qom: Make CPU a child of DeviceState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Andreas_F=E4rber?= Cc: Igor Mammedov , Don Slutz , Eduardo Habkost , Anthony Liguori , qemu-devel@nongnu.org Il 14/12/2012 16:29, Andreas F=E4rber ha scritto: > The latest motivation for making the CPU a device was to have the stati= c > properties infrastructure for machine/CPU versioning. The global > property defaults are set in qdev's instance_init, so object_new() seem= s > fine for that. >=20 > qdev_[try_]create() would further set the parent bus to SysBus if NULL. > The CPU is not a SysBusDevice so I think not using qdev_create() may be > safer... Maybe Anthony or Paolo can confirm? I think various parts of qdev assume there is a bus, so actually using SysBus would be safer (though uglier). Paolo