qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/2] QOM realize, device-only
@ 2013-01-06 18:48 Andreas Färber
  2013-01-06 18:48 ` [Qemu-devel] [PATCH v2 1/2] qdev: Fold state enum into bool realized Andreas Färber
  2013-01-06 18:48 ` [Qemu-devel] [PATCH v2 2/2] qdev: Prepare "realized" property Andreas Färber
  0 siblings, 2 replies; 4+ messages in thread
From: Andreas Färber @ 2013-01-06 18:48 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Eduardo Habkost, anthony, Igor Mammedov, pbonzini,
	Andreas Färber

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 <anthony@codemonkey.ws>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-07 13:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-06 18:48 [Qemu-devel] [PATCH v2 0/2] QOM realize, device-only Andreas Färber
2013-01-06 18:48 ` [Qemu-devel] [PATCH v2 1/2] qdev: Fold state enum into bool realized Andreas Färber
2013-01-06 18:48 ` [Qemu-devel] [PATCH v2 2/2] qdev: Prepare "realized" property Andreas Färber
2013-01-07 13:52   ` Eduardo Habkost

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).