From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVt30-0005ik-2Z for qemu-devel@nongnu.org; Wed, 30 Nov 2011 17:54:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVt2y-0005Aa-UN for qemu-devel@nongnu.org; Wed, 30 Nov 2011 17:54:38 -0500 Received: from e2.ny.us.ibm.com ([32.97.182.142]:37157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVt2y-0005AE-Rm for qemu-devel@nongnu.org; Wed, 30 Nov 2011 17:54:36 -0500 Received: from /spool/local by e2.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 30 Nov 2011 17:54:32 -0500 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pAUMsSZT343156 for ; Wed, 30 Nov 2011 17:54:28 -0500 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pAUMsQcV010877 for ; Wed, 30 Nov 2011 15:54:28 -0700 Message-ID: <4ED6B420.9040905@us.ibm.com> Date: Wed, 30 Nov 2011 16:54:24 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1322687028-29714-1-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1322687028-29714-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 00/18] qom: dynamic properties and composition tree List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , Stefan Hajnoczi , Jan Kiszka , Markus Armbruster , qemu-devel@nongnu.org, Luiz Capitulino On 11/30/2011 03:03 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. > > 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 It's probably worth adding that this is the short form. The full path for rtc is /i440fx/piix4/rtc. If user did -device virtio-pci-blk,id=rtc, then that device would have a full path for /peripheral/rtc. If you did that, then just saying 'rtc.date' would through an error because the relative path 'rtc' is ambiguous. The purpose of this is to give stable, unambiguous paths while still making it easy to use for a command line user. Regards, Anthony Liguori