qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 0/4] qdev: give all devices a canonical QOM path


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH 0/4] qdev: give all devices a canonical QOM path
Date: Tue, 27 Mar 2012 18:38:44 +0200

A strong limitation of QOM right now is that unconverted ports
(e.g. all...) do not give a canonical path to devices that are
part of the board.  This in turn makes it impossible to replace
PROP_PTR with a QOM link for example.

This series fixes this by putting all such devices under a
/unattached container.

The problem is when to do this.  qdev_init is a good place, but it
requires the composition tree to be in order by the time we call it.
This is not the case so far, but it can be changed easily (patch 2) at
the cost of removing most of the few composition examples that are in the
tree.  This change is also necessary so that a single set of the topmost
realize property can propagate all the way down the composition tree,
as agreed on the mailing list.

At the end of the series, all devices are moved to /machine
in order to avoid cluttering too much the QOM root.

Paolo Bonzini (4):
  qom: add container_get
  qdev: add children before qdev_init
  qdev: give all devices a canonical path
  qdev: put all devices under /machine

 hw/pc_piix.c          |   18 +-----------------
 hw/piix_pci.c         |    3 +--
 hw/ppc_prep.c         |    2 +-
 hw/qdev-monitor.c     |   16 ++++++----------
 hw/qdev.c             |   16 +++++++++++++---
 include/qemu/object.h |   24 ++++++++++++++++++++++++
 qom/container.c       |   23 +++++++++++++++++++++++
 qom/object.c          |   33 +++++++++++++++++----------------
 8 files changed, 86 insertions(+), 49 deletions(-)

-- 
1.7.9.1




reply via email to

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