From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCdgY-0002mr-TN for qemu-devel@nongnu.org; Tue, 27 Mar 2012 17:12:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCdgX-0005Ts-1r for qemu-devel@nongnu.org; Tue, 27 Mar 2012 17:12:10 -0400 Received: from e9.ny.us.ibm.com ([32.97.182.139]:59058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCdgW-0005Q8-UL for qemu-devel@nongnu.org; Tue, 27 Mar 2012 17:12:08 -0400 Received: from /spool/local by e9.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 Mar 2012 17:12:04 -0400 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 789F638C805C for ; Tue, 27 Mar 2012 17:12:02 -0400 (EDT) Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q2RLBmP42535482 for ; Tue, 27 Mar 2012 17:11:48 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q2S2gdnI007701 for ; Tue, 27 Mar 2012 22:42:40 -0400 Message-ID: <4F722D0E.7080900@us.ibm.com> Date: Tue, 27 Mar 2012 16:11:42 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1332866328-25443-1-git-send-email-pbonzini@redhat.com> <1332866328-25443-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1332866328-25443-5-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/4] qdev: put all devices under /machine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: aliguori@linux.vnet.ibm.com, andreas.faerber@web.de, qemu-devel@nongnu.org On 03/27/2012 11:38 AM, Paolo Bonzini wrote: > Avoid cluttering too much the QOM root. > > Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori > --- > hw/piix_pci.c | 2 +- > hw/ppc_prep.c | 2 +- > hw/qdev-monitor.c | 4 ++-- > hw/qdev.c | 2 +- > 4 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/hw/piix_pci.c b/hw/piix_pci.c > index 9017565..bd20a16 100644 > --- a/hw/piix_pci.c > +++ b/hw/piix_pci.c > @@ -276,7 +276,7 @@ static PCIBus *i440fx_common_init(const char *device_name, > b = pci_bus_new(&s->busdev.qdev, NULL, pci_address_space, > address_space_io, 0); > s->bus = b; > - object_property_add_child(object_get_root(), "i440fx", OBJECT(dev), NULL); > + object_property_add_child(container_get("/machine"), "i440fx", OBJECT(dev), NULL); > qdev_init_nofail(dev); > > d = pci_create_simple(b, 0, device_name); > diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c > index 86c9336..d06fc5e 100644 > --- a/hw/ppc_prep.c > +++ b/hw/ppc_prep.c > @@ -615,7 +615,7 @@ static void ppc_prep_init (ram_addr_t ram_size, > sys = sysbus_from_qdev(dev); > pcihost = DO_UPCAST(PCIHostState, busdev, sys); > pcihost->address_space = get_system_memory(); > - object_property_add_child(object_get_root(), "raven", OBJECT(dev), NULL); > + object_property_add_child(container_get("/machine", "raven", OBJECT(dev), NULL); > qdev_init_nofail(dev); > pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci.0"); > if (pci_bus == NULL) { > diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c > index 031cb83..4783366 100644 > --- a/hw/qdev-monitor.c > +++ b/hw/qdev-monitor.c > @@ -180,7 +180,7 @@ static Object *qdev_get_peripheral(void) > static Object *dev; > > if (dev == NULL) { > - dev = container_get("/peripheral"); > + dev = container_get("/machine/peripheral"); > } > > return dev; > @@ -191,7 +191,7 @@ static Object *qdev_get_peripheral_anon(void) > static Object *dev; > > if (dev == NULL) { > - dev = container_get("/peripheral-anon"); > + dev = container_get("/machine/peripheral-anon"); > } > > return dev; > diff --git a/hw/qdev.c b/hw/qdev.c > index f5c716e..60e5081 100644 > --- a/hw/qdev.c > +++ b/hw/qdev.c > @@ -157,7 +157,7 @@ int qdev_init(DeviceState *dev) > static int unattached_count = 0; > gchar *name = g_strdup_printf("device[%d]", unattached_count++); > > - object_property_add_child(container_get("/unattached"), name, > + object_property_add_child(container_get("/machine/unattached"), name, > OBJECT(dev), NULL); > g_free(name); > }