qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	anthony@codemonkey.ws, "Igor Mammedov" <imammedo@redhat.com>,
	pbonzini@redhat.com, "Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH v2 0/2] QOM realize, device-only
Date: Sun,  6 Jan 2013 19:48:40 +0100	[thread overview]
Message-ID: <1357498122-1129-1-git-send-email-afaerber@suse.de> (raw)

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

             reply	other threads:[~2013-01-06 18:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-06 18:48 Andreas Färber [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1357498122-1129-1-git-send-email-afaerber@suse.de \
    --to=afaerber@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).