From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkHI4-0005ap-Mc for qemu-devel@nongnu.org; Sun, 16 Dec 2012 11:42:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TkHI3-0004w4-M5 for qemu-devel@nongnu.org; Sun, 16 Dec 2012 11:42:12 -0500 Received: from cantor2.suse.de ([195.135.220.15]:51383 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkHI3-0004vv-9Y for qemu-devel@nongnu.org; Sun, 16 Dec 2012 11:42:11 -0500 Message-ID: <50CDF9D4.6080009@suse.de> Date: Sun, 16 Dec 2012 17:41:56 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1355157952-2321-1-git-send-email-fred.konrad@greensocs.com> <1355157952-2321-8-git-send-email-fred.konrad@greensocs.com> <50C8C4A2.7010709@suse.de> In-Reply-To: <50C8C4A2.7010709@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com, Paolo Bonzini Cc: Peter Maydell , e.voevodin@samsung.com, "Michael S. Tsirkin" , mark.burton@greensocs.com, Alexander Graf , qemu-devel@nongnu.org, stefanha@redhat.com, cornelia.huck@de.ibm.com, fred.konrad@greensocs.com Am 12.12.2012 18:53, schrieb Andreas F=C3=A4rber: > Finally supplying a public device_initialize() or so would be helpful > for the latter since VMState cannot cross pointers IIRC. I'll look into > that part since inlining the old qdev functions cripples my Tegra work. Investigating this, it turned out that my branch was outdated in still calling qdev_prop_set_globals(), which some good soul (Paolo?) inlined into device initfn. So the only step taken by qdev_try_create() that remains after object_initialize() is qdev_set_parent_bus(), which I think does not warrant a device_post_initialize: -> qdev_set_parent_bus() qdev_try_create: -> object_new() -> device_post_initialize() qdev_create: -> qdev_try_create() device_initialize: -> object_initialize() -> device_post_initialize() construction. So, given that virtio device states are in (or moved to) a header, they can already be embedded in a has-a virtio-bus has-a Virtio*Device device today and initialized with object_initialize(&s->the_device) and qdev_set_parent_bus(&s->the_device, &s->the_virtio_bus). Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg