From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V20ja-0005sj-IF for qemu-devel@nongnu.org; Wed, 24 Jul 2013 11:12:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V20jY-0001lk-GV for qemu-devel@nongnu.org; Wed, 24 Jul 2013 11:12:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V20jY-0001lJ-8U for qemu-devel@nongnu.org; Wed, 24 Jul 2013 11:12:08 -0400 Message-ID: <51EFEEA8.3030309@redhat.com> Date: Wed, 24 Jul 2013 17:11:36 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1373307914-18543-1-git-send-email-mst@redhat.com> <1373307914-18543-4-git-send-email-mst@redhat.com> <87fvvo3m2c.fsf@codemonkey.ws> <20130708195259.GA19775@redhat.com> <51EFE7C0.5060202@redhat.com> <51EFEA15.1090700@suse.de> <51EFECE9.3090308@redhat.com> <51EFEE0F.1090605@suse.de> In-Reply-To: <51EFEE0F.1090605@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [SeaBIOS] [PATCH v2 3/4] i386: generate pc guest info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Andreas_F=E4rber?= Cc: Anthony Liguori , "Michael S. Tsirkin" , seabios@seabios.org, qemu-devel@nongnu.org, Gerd Hoffmann , Aurelien Jarno Il 24/07/2013 17:09, Andreas F=E4rber ha scritto: > Hi, >=20 > Am 24.07.2013 17:04, schrieb Gerd Hoffmann: >>>> /me suggests to check out qmp_qom_get() in qmp.c. Some qom aequival= ent >>>> for qdev_find_recursive would be handy, dunno whenever such a thing >>>> exists already, Andreas? >>> >>> Not sure what's needed here? object_resolve_path() and >>> object_foreach_child() come to mind... >> >> object_resolve_path should do to (a) figure whenever we are i440fx or >> q35 and (b) get the pcihost device (then read enable_s3 etc properties= ). >> >> For pvpanic (and maybe others) it might be handy to have "find me the >> device of type TYPE_ISA_PVPANIC_DEVICE, anywhere in the tree" >> functionality, so the same code works no matter where the isa bridge >> happens to live. Or "find me all pci bridges in the system". >=20 > I think Paolo used object_resolve_path_type("", TYPE_...) for that > somewhere in audio code. Yes. It returns NULL if there is more than one device, but in some cases it may be exactly what you want... Paolo >> Is object_foreach_child recursive? Then it might do the job ... >=20 > No, recursion would need to be implemented in the callback - my recent > recursive QOM realization series had an example of a deep search for > devices. >=20 > Regards, > Andreas >=20