[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 0/2] QOM realize, device-only
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH v2 0/2] QOM realize, device-only |
Date: |
Sun, 6 Jan 2013 19:48:40 +0100 |
Hello Anthony,
Here's a rebased version of device-only QOM realization, otherwise unchanged.
This is based on master now and drops all general-purpose qdev cleanups that
potentially conflict with Paolo's reference counting change proposal.
It will trivially conflict with my qdev unparenting fix, pending to be added
to the qom-cpu queue (touches k->unparent in class_init).
Same as v1, this is not the big throw of a recursive, central realization model.
The immediate purpose of this series is to allow CPUs, which partially already
have realizefns prepared, to adjust to the new DeviceState signature (being a
device on qom-cpu branch) and hook them up to DeviceClass::realize rather than
exposing as a function through cpu.h. Please review and apply to qemu.git.
As discussed in the last cover letter, doing realization at DeviceState level
does not allow for trivial [un]realize_children as proposed by Paolo for Object.
An idea how to implement this as a follow-up would be to do a deep search for
child<> properties dynamic_cast'able to DeviceState. Or to simply try setting
a "realized" property and it that fails check for children (but how to differ
between "realized" that failed and "realized" that doesn't exist then?).
Available from:
https://github.com/afaerber/qemu-cpu/commits/realize-qdev.v2
git://github.com/afaerber/qemu-cpu.git realize-qdev.v2
Regards,
Andreas
Cc: Anthony Liguori <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Eduardo Habkost <address@hidden>
Cc: Igor Mammedov <address@hidden>
Cc: Peter Maydell <address@hidden>
Andreas Färber (2):
qdev: Fold state enum into bool realized
qdev: Prepare "realized" property
hw/qdev-addr.c | 2 +-
hw/qdev-core.h | 11 ++---
hw/qdev-properties-system.c | 4 +-
hw/qdev-properties.c | 24 +++++-----
hw/qdev.c | 106 +++++++++++++++++++++++++++++++------------
5 Dateien geändert, 97 Zeilen hinzugefügt(+), 50 Zeilen entfernt(-)
--
1.7.10.4
- [Qemu-devel] [PATCH v2 0/2] QOM realize, device-only,
Andreas Färber <=