From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbFlW-00050q-Be for qemu-devel@nongnu.org; Thu, 15 Dec 2011 13:10:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbFlV-000781-5l for qemu-devel@nongnu.org; Thu, 15 Dec 2011 13:10:46 -0500 Received: from e8.ny.us.ibm.com ([32.97.182.138]:47872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbFlV-00077r-0V for qemu-devel@nongnu.org; Thu, 15 Dec 2011 13:10:45 -0500 Received: from /spool/local by e8.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 15 Dec 2011 13:10:43 -0500 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBFIAU2V289608 for ; Thu, 15 Dec 2011 13:10:31 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBFIATY2007048 for ; Thu, 15 Dec 2011 16:10:30 -0200 Message-ID: <4EEA3813.80006@us.ibm.com> Date: Thu, 15 Dec 2011 12:10:27 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1323721784-704-1-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1323721784-704-1-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 00/20] qom: dynamic properties and composition tree List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Peter Maydell , Stefan Hajnoczi , Jan Kiszka , Markus Armbruster , Luiz Capitulino On 12/12/2011 02:29 PM, Anthony Liguori wrote: > This is a follow up to my previous series to get us started in the QOM > direction. A few things are different this time around. Most notably: > > 1) Devices no longer have names. Instead, path names are always used to > identify devices. > > 2) In order to support (1), dynamic properties are now supported. > > 3) The concept of a "root device" has been introduced. The root device is > roughly modelling the motherboard of a machine. This type is a container > type and it's best to think of it as something like a PCB board I guess. > > See my other mail for a description of my merge plan for QOM. Applied. Regards, Anthony Liguori > > To try it out, here's an example session: > > Launch: > > anthony@titi:~/build/qemu$ x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img -snapshot -device virtio-balloon-pci,id=foo -qmp unix:/tmp/server.sock,server,nowait > > Explore the object model: > > anthony@titi:~/git/qemu/QMP$ ./qom-list / > peripheral/ > i440fx/ > anthony@titi:~/git/qemu/QMP$ ./qom-list /i440fx/ > piix3/ > anthony@titi:~/git/qemu/QMP$ ./qom-list /i440fx/piix3 > rtc/ > anthony@titi:~/git/qemu/QMP$ ./qom-list /i440fx/piix3/rtc > date > base_year > anthony@titi:~/git/qemu/QMP$ ./qom-get /i440fx/piix3/rtc.date > tm_sec: 33 > tm_hour: 21 > tm_mday: 30 > tm_year: 111 > tm_mon: 10 > tm_min: 2 > anthony@titi:~/git/qemu/QMP$ ./qom-get rtc.date > tm_sec: 38 > tm_hour: 21 > tm_mday: 30 > tm_year: 111 > tm_mon: 10 > tm_min: 2 > anthony@titi:~/git/qemu/QMP$ ./qom-list /peripheral > foo/ > anthony@titi:~/git/qemu/QMP$ ./qom-list /peripheral/foo > event_idx > indirect_desc > > Anthony Liguori (20): > qom: add a reference count to qdev objects > qom: add new dynamic property infrastructure based on Visitors (v2) > qom: register legacy properties as new style properties (v2) > qom: introduce root device > qdev: provide an interface to return canonical path from root (v2) > qdev: provide a path resolution (v2) > qom: add child properties (composition) (v3) > qom: add link properties (v2) > qapi: allow a 'gen' key to suppress code generation > qmp: add qom-list command > qom: qom_{get,set} monitor commands (v2) > qdev: add explicitly named devices to the root complex > dev: add an anonymous peripheral container > rtc: make piix3 set the rtc as a child (v2) > rtc: add a dynamic property for retrieving the date > qom: optimize qdev_get_canonical_path using a parent link > qom: add vga node to the pc composition tree > qom: add string property type > qdev: add a qdev_get_type() function and expose as a 'type' property > pc: fill out most of the composition tree > > Makefile.objs | 2 +- > hw/acpi_piix4.c | 7 +- > hw/cirrus_vga.c | 8 +- > hw/container.c | 20 ++ > hw/ide/pci.c | 11 +- > hw/kvmclock.c | 5 +- > hw/kvmclock.h | 5 +- > hw/mc146818rtc.c | 27 +++ > hw/mips_malta.c | 5 +- > hw/pc.c | 75 +++++-- > hw/pc.h | 51 +++-- > hw/pc_piix.c | 61 ++++-- > hw/piix_pci.c | 11 +- > hw/qdev.c | 555 +++++++++++++++++++++++++++++++++++++++++++++- > hw/qdev.h | 281 +++++++++++++++++++++++ > hw/usb-uhci.c | 4 +- > hw/usb-uhci.h | 2 +- > hw/vga-pci.c | 5 +- > hw/vmware_vga.h | 6 +- > monitor.h | 4 + > qapi-schema.json | 107 +++++++++ > qerror.c | 4 + > qerror.h | 3 + > qmp-commands.hx | 18 ++ > qmp.c | 93 ++++++++ > scripts/qapi-commands.py | 1 + > scripts/qapi-types.py | 1 + > 27 files changed, 1289 insertions(+), 83 deletions(-) > create mode 100644 hw/container.c >