[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 00/18] qom: dynamic properties and composition tr

From: Anthony Liguori
Subject: [Qemu-devel] [PATCH v2 00/18] qom: dynamic properties and composition tree (v2)
Date: Fri, 2 Dec 2011 14:20:38 -0600

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:


address@hidden:~/build/qemu$ x86_64-softmmu/qemu-system-x86_64 -hda 
~/images/linux.img -snapshot -device virtio-balloon-pci,id=foo -qmp 

Explore the object model:

address@hidden:~/git/qemu/QMP$ ./qom-list /
address@hidden:~/git/qemu/QMP$ ./qom-list /i440fx/
address@hidden:~/git/qemu/QMP$ ./qom-list /i440fx/piix3
address@hidden:~/git/qemu/QMP$ ./qom-list /i440fx/piix3/rtc
address@hidden:~/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
address@hidden:~/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
address@hidden:~/git/qemu/QMP$ ./qom-list /peripheral
address@hidden:~/git/qemu/QMP$ ./qom-list /peripheral/foo

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]