From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5trg-0003JP-QF for qemu-devel@nongnu.org; Fri, 19 Jun 2015 06:49:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5trd-0001zr-3l for qemu-devel@nongnu.org; Fri, 19 Jun 2015 06:49:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5trc-0001zU-SL for qemu-devel@nongnu.org; Fri, 19 Jun 2015 06:49:37 -0400 Date: Fri, 19 Jun 2015 11:49:31 +0100 From: "Daniel P. Berrange" Message-ID: <20150619104931.GA7018@redhat.com> References: <1432750824-27702-1-git-send-email-afaerber@suse.de> <1432750824-27702-8-git-send-email-afaerber@suse.de> <5583E8E1.7090604@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5583E8E1.7090604@suse.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PULL v2 07/12] vl: Create (most) objects before creating chardev backends Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= Cc: Paolo Bonzini , qemu-devel@nongnu.org, Markus Armbruster On Fri, Jun 19, 2015 at 12:03:13PM +0200, Andreas F=C3=A4rber wrote: > Am 27.05.2015 um 20:20 schrieb Andreas F=C3=A4rber: > > From: "Daniel P. Berrange" > >=20 > > Some types of object must be created before chardevs, other types of > > object must be created after chardevs. As such there is no option but > > to create objects in two phases. > >=20 > > This takes the decision to create as many object types as possible > > right away before anyother backends are created, and only delay > > creation of those few which have an explicit dependency on the > > chardevs. Hopefully the set which need delaying will remain small > > over time. > >=20 > > Signed-off-by: Daniel P. Berrange > > Reviewed-by: Paolo Bonzini > > Signed-off-by: Andreas F=C3=A4rber > > --- > > vl.c | 40 +++++++++++++++++++++++++++++++++++++++- > > 1 file changed, 39 insertions(+), 1 deletion(-) >=20 > Rebasing my queue, I needed the attached changes to make it apply and > build. Second pairs of eyes welcome. > @@@ -4114,14 -4062,16 +4145,20 @@@ int main(int argc, char **argv, char= ** > =20 > socket_init(); > =20 > + if (qemu_opts_foreach(qemu_find_opts("object"), > + object_create, > - object_create_initial, 0) !=3D 0) { > ++ object_create_initial, NULL)) { > + exit(1); > + } > +=20 > - if (qemu_opts_foreach(qemu_find_opts("chardev"), chardev_init_fun= c, NULL, 1) !=3D 0) > + if (qemu_opts_foreach(qemu_find_opts("chardev"), > + chardev_init_func, NULL, NULL)) { > exit(1); > + } > + > #ifdef CONFIG_VIRTFS > - if (qemu_opts_foreach(qemu_find_opts("fsdev"), fsdev_init_func, N= ULL, 1) !=3D 0) { > + if (qemu_opts_foreach(qemu_find_opts("fsdev"), > + fsdev_init_func, NULL, NULL)) { > exit(1); > } > #endif > @@@ -4137,7 -4087,8 +4174,8 @@@ > } > =20 > if (qemu_opts_foreach(qemu_find_opts("object"), > - object_create, NULL, NULL)) { > + object_create, > - object_create_delayed, 0) !=3D 0) { > ++ object_create_delayed, NULL)) { > exit(1); > } Yep, this looks correct wrt the change of Markus' that recently merged in vl.c Regards, Daniel --=20 |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| |: http://libvirt.org -o- http://virt-manager.or= g :| |: http://autobuild.org -o- http://search.cpan.org/~danberr= / :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vn= c :|