From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNi4Q-0007sa-7n for qemu-devel@nongnu.org; Thu, 04 Apr 2013 07:11:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNi4H-0002Tk-Vh for qemu-devel@nongnu.org; Thu, 04 Apr 2013 07:11:06 -0400 Received: from cantor2.suse.de ([195.135.220.15]:33573 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNi4H-0002Td-MV for qemu-devel@nongnu.org; Thu, 04 Apr 2013 07:10:57 -0400 Message-ID: <515D5FBE.4040608@suse.de> Date: Thu, 04 Apr 2013 13:10:54 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1363876125-8264-1-git-send-email-imammedo@redhat.com> <1363876125-8264-8-git-send-email-imammedo@redhat.com> <20130328115501.51ff4ee6@thinkpad.mammed.net> In-Reply-To: <20130328115501.51ff4ee6@thinkpad.mammed.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 07/12] target-i386: Add ICC_BUS and attach apic, kvmvapic and cpu to it List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: kwolf@redhat.com, peter.maydell@linaro.org, aliguori@us.ibm.com, yang.z.zhang@intel.com, ehabkost@redhat.com, mst@redhat.com, jan.kiszka@siemens.com, stefano.stabellini@eu.citrix.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, aderumier@odiso.com, armbru@redhat.com, blauwirbel@gmail.com, quintela@redhat.com, alex.williamson@redhat.com, kraxel@redhat.com, anthony.perard@citrix.com, pbonzini@redhat.com, lcapitulino@redhat.com, rth@twiddle.net Am 28.03.2013 11:55, schrieb Igor Mammedov: > On Wed, 27 Mar 2013 11:57:53 +0100 > Paolo Bonzini wrote: >=20 >> Il 21/03/2013 15:28, Igor Mammedov ha scritto: =20 >>> +static BusState *icc_bus; >>> + >>> +BusState *get_icc_bus(void) >>> +{ >>> + if (icc_bus =3D=3D NULL) { >>> + icc_bus =3D g_malloc0(icc_bus_info.instance_size); >>> + qbus_create_inplace(icc_bus, TYPE_ICC_BUS, NULL, "icc-bus"); >>> + icc_bus->allow_hotplug =3D 1; >>> + OBJECT(icc_bus)->free =3D g_free; =20 >> >> You can just use qbus_create. >> =20 >>> + object_property_add_child(container_get(qdev_get_machine(), >>> + "/unattached"), =20 >> >> Please put it straight under /machine, not /unattached. =20 >=20 > sure >=20 >> >> But actually, you lack a device that instantiates the bus. That devic= e >> would be a simple container device similar hw/a15mpcore.c, and would =20 >=20 > About a year ago something like that device was proposed "cpu_sockets",= but > there was suggestion to drop it: > http://lists.gnu.org/archive/html/qemu-devel/2012-02/msg02157.html > So I've opted in favor of parent-less bus, but I could create it > explicitly at board level as you suggest. >=20 > However having parent sysbus device for icc-bus will allow to see it vi= a > monitor info qtree As I said on IRC, info qtree should not influence our design decisions. All that's missing is a convenient script that pretty-prints the output from the QOM graph using qom-list and qom-get in a non-interactive way. Whether CPUs or busses are shown in info qtree is totally irrelevant IMO by now. > and reset on SysBus could be propagated through it as well, > it may be good to add it later. What exactly is this ICC bus needed for? Is it just a workaround for qdev_init() or something making assumptions about busses and falling back to SysBus otherwise? Or about avoiding SysBus? And where would it sit if be hosted you think of something like Qseven modules - on the board or on the module? I don't see pc.c being touched here at all... Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg