qemu-devel
[Top][All Lists]
Advanced

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

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


From: Anthony Liguori
Subject: [Qemu-devel] [PATCH 00/18] qom: dynamic properties and composition tree
Date: Wed, 30 Nov 2011 15:03:30 -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:

Launch:

address@hidden:~/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:

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

Anthony Liguori (18):
  qom: add new dynamic property infrastructure based on Visitors
  qom: register legacy properties as new style properties
  qom: introduce root device
  qdev: provide an interface to return canonical path from root
  qdev: provide a path resolution
  qom: add child properties (composition)
  qom: add link properties
  qapi: allow a 'gen' key to suppress code generation
  qmp: add qom-list command
  qom: qom_{get,set} monitor commands
  qdev: add explicitly named devices to the root complex
  dev: add an anonymous peripheral container
  rtc: make piix3 set the rtc as a child
  rtc: add a dynamic property for retrieving the date
  qom: optimize qdev_get_canonical_path using a parent link
  Make qmp.py easier to use
  Add test tools
  qdev: split out QOM functions to separate files

 Makefile.objs            |    4 +-
 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-qom.h            |  200 ++++++++++++++++++++++
 hw/qdev.c                |   63 +++++++-
 hw/qdev.h                |   44 +++++
 hw/qom.c                 |  414 ++++++++++++++++++++++++++++++++++++++++++++++
 monitor.h                |    4 +
 qapi-schema.json         |  107 ++++++++++++
 qerror.c                 |    4 +
 qerror.h                 |    3 +
 qmp-commands.hx          |   18 ++
 qmp.c                    |   94 +++++++++++
 scripts/qapi-commands.py |    1 +
 scripts/qapi-types.py    |    1 +
 21 files changed, 1098 insertions(+), 3 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
 create mode 100644 hw/qdev-qom.h
 create mode 100644 hw/qom.c

-- 
1.7.4.1




reply via email to

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