qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 00/18] qom: dynamic properties and composition tree (v2)
@ 2011-12-02 20:20 Anthony Liguori
  2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 01/18] qom: add a reference count to qdev objects Anthony Liguori
                   ` (17 more replies)
  0 siblings, 18 replies; 36+ messages in thread
From: Anthony Liguori @ 2011-12-02 20:20 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Peter Maydell, Anthony Liguori, Stefan Hajnoczi,
	Jan Kiszka, Markus Armbruster, Luiz Capitulino, Gerd Hoffman

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
anthony@titi:~/git/qemu/QMP$ ./qom-list /peripheral
foo/
anthony@titi:~/git/qemu/QMP$ ./qom-list /peripheral/foo
event_idx
indirect_desc

Anthony Liguori (18):
  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) (v2)
  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
  qmp: make qmp.py easier to use
  qom: add test tools (v2)

 Makefile.objs            |    2 +-
 QMP/qmp.py               |    6 +
 QMP/qom-get              |   26 +++
 QMP/qom-list             |   30 +++
 QMP/qom-set              |   21 ++
 hw/container.c           |   20 ++
 hw/mc146818rtc.c         |   27 +++
 hw/pc_piix.c             |   11 +
 hw/piix_pci.c            |    3 +
 hw/qdev.c                |  489 +++++++++++++++++++++++++++++++++++++++++++++-
 hw/qdev.h                |  245 +++++++++++++++++++++++
 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 +
 19 files changed, 1109 insertions(+), 2 deletions(-)
 create mode 100755 QMP/qom-get
 create mode 100755 QMP/qom-list
 create mode 100755 QMP/qom-set
 create mode 100644 hw/container.c

-- 
1.7.4.1

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2011-12-13 13:46 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-02 20:20 [Qemu-devel] [PATCH v2 00/18] qom: dynamic properties and composition tree (v2) Anthony Liguori
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 01/18] qom: add a reference count to qdev objects Anthony Liguori
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 02/18] qom: add new dynamic property infrastructure based on Visitors (v2) Anthony Liguori
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 03/18] qom: register legacy properties as new style properties (v2) Anthony Liguori
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 04/18] qom: introduce root device Anthony Liguori
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 05/18] qdev: provide an interface to return canonical path from root (v2) Anthony Liguori
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 06/18] qdev: provide a path resolution (v2) Anthony Liguori
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 07/18] qom: add child properties (composition) (v2) Anthony Liguori
2011-12-08 15:38   ` Kevin Wolf
2011-12-08 16:45     ` Anthony Liguori
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 08/18] qom: add link properties (v2) Anthony Liguori
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 09/18] qapi: allow a 'gen' key to suppress code generation Anthony Liguori
2011-12-08 16:04   ` Kevin Wolf
2011-12-08 16:45     ` Anthony Liguori
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 10/18] qmp: add qom-list command Anthony Liguori
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 11/18] qom: qom_{get, set} monitor commands (v2) Anthony Liguori
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 12/18] qdev: add explicitly named devices to the root complex Anthony Liguori
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 13/18] dev: add an anonymous peripheral container Anthony Liguori
2011-12-08 16:27   ` Kevin Wolf
2011-12-08 16:44     ` Anthony Liguori
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 14/18] rtc: make piix3 set the rtc as a child (v2) Anthony Liguori
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 15/18] rtc: add a dynamic property for retrieving the date Anthony Liguori
2011-12-09 11:26   ` Kevin Wolf
2011-12-09 13:08     ` Anthony Liguori
2011-12-09 14:04       ` Kevin Wolf
2011-12-09 14:25         ` Anthony Liguori
2011-12-13  9:27           ` Kevin Wolf
2011-12-13  9:48             ` Gerd Hoffmann
2011-12-13 13:33               ` Anthony Liguori
2011-12-13 13:31             ` Anthony Liguori
2011-12-13 13:49               ` Kevin Wolf
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 16/18] qom: optimize qdev_get_canonical_path using a parent link Anthony Liguori
2011-12-09 11:13   ` Kevin Wolf
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 17/18] qmp: make qmp.py easier to use Anthony Liguori
2011-12-02 20:20 ` [Qemu-devel] [PATCH v2 18/18] qom: add test tools (v2) Anthony Liguori
2011-12-09 11:19   ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).