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

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.

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

-- 
1.7.4.1

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

end of thread, other threads:[~2011-12-16 15:07 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-12 20:29 [Qemu-devel] [PATCH v3 00/20] qom: dynamic properties and composition tree Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 01/20] qom: add a reference count to qdev objects Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 02/20] qom: add new dynamic property infrastructure based on Visitors (v2) Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 03/20] qom: register legacy properties as new style properties (v2) Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 04/20] qom: introduce root device Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 05/20] qdev: provide an interface to return canonical path from root (v2) Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 06/20] qdev: provide a path resolution (v2) Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 07/20] qom: add child properties (composition) (v3) Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 08/20] qom: add link properties (v2) Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 09/20] qapi: allow a 'gen' key to suppress code generation Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 10/20] qmp: add qom-list command Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 11/20] qom: qom_{get, set} monitor commands (v2) Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 12/20] qdev: add explicitly named devices to the root complex Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 13/20] dev: add an anonymous peripheral container Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 14/20] rtc: make piix3 set the rtc as a child (v2) Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 15/20] rtc: add a dynamic property for retrieving the date Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 16/20] qom: optimize qdev_get_canonical_path using a parent link Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 17/20] qom: add vga node to the pc composition tree Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 18/20] qom: add string property type Anthony Liguori
2011-12-12 20:29 ` [Qemu-devel] [PATCH v3 19/20] qdev: add a qdev_get_type() function and expose as a 'type' property Anthony Liguori
2011-12-15 18:10 ` [Qemu-devel] [PATCH v3 00/20] qom: dynamic properties and composition tree Anthony Liguori
2011-12-16  9:42   ` Kevin Wolf
2011-12-16 10:17     ` Paolo Bonzini
2011-12-16 10:36       ` Kevin Wolf
2011-12-16 12:24         ` Paolo Bonzini
2011-12-16 12:55           ` Kevin Wolf
2011-12-16 13:28             ` Paolo Bonzini
2011-12-16 13:52               ` Anthony Liguori
2011-12-16 13:51           ` Anthony Liguori
2011-12-16 13:52             ` Paolo Bonzini
2011-12-16 14:11               ` Anthony Liguori
2011-12-16 14:18             ` Kevin Wolf
2011-12-16 14:54               ` Anthony Liguori
2011-12-16 14:56                 ` Paolo Bonzini
2011-12-16 15:10                 ` Kevin Wolf
2011-12-16 13:49       ` Anthony Liguori
2011-12-16 13:48     ` Anthony Liguori

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).