[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 00/20] qom: dynamic properties and composition tr
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH v3 00/20] qom: dynamic properties and composition tree |
Date: |
Mon, 12 Dec 2011 14:29:24 -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.
See my other mail for a description of my merge plan for QOM.
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 (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
- [Qemu-devel] [PATCH v3 00/20] qom: dynamic properties and composition tree,
Anthony Liguori <=
- [Qemu-devel] [PATCH v3 01/20] qom: add a reference count to qdev objects, Anthony Liguori, 2011/12/12
- [Qemu-devel] [PATCH v3 02/20] qom: add new dynamic property infrastructure based on Visitors (v2), Anthony Liguori, 2011/12/12
- [Qemu-devel] [PATCH v3 03/20] qom: register legacy properties as new style properties (v2), Anthony Liguori, 2011/12/12
- [Qemu-devel] [PATCH v3 04/20] qom: introduce root device, Anthony Liguori, 2011/12/12
- [Qemu-devel] [PATCH v3 05/20] qdev: provide an interface to return canonical path from root (v2), Anthony Liguori, 2011/12/12
- [Qemu-devel] [PATCH v3 06/20] qdev: provide a path resolution (v2), Anthony Liguori, 2011/12/12
- [Qemu-devel] [PATCH v3 07/20] qom: add child properties (composition) (v3), Anthony Liguori, 2011/12/12
- [Qemu-devel] [PATCH v3 08/20] qom: add link properties (v2), Anthony Liguori, 2011/12/12
- [Qemu-devel] [PATCH v3 10/20] qmp: add qom-list command, Anthony Liguori, 2011/12/12
- [Qemu-devel] [PATCH v3 09/20] qapi: allow a 'gen' key to suppress code generation, Anthony Liguori, 2011/12/12