qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Developers qemu-devel <qemu-devel@nongnu.org>,
	KVM devel mailing list <kvm@vger.kernel.org>,
	quintela@redhat.com
Subject: Re: [Qemu-devel] KVM call agenda for Tuesday 7
Date: Tue, 07 Feb 2012 19:17:28 +0100	[thread overview]
Message-ID: <4F316AB8.1060207@suse.de> (raw)
In-Reply-To: <4F3166EC.7000002@codemonkey.ws>

Am 07.02.2012 19:01, schrieb Anthony Liguori:
> On 02/07/2012 07:45 AM, Andreas Färber wrote:
>> http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg04065.html
>>
>> How is the realize step (DeviceState::init) supposed to translate to
>> Object-derived classes (e.g., CPU) and where to draw the line between
>> initfn and realize.
> 
> Realize probably should be folded into Object or some intermediate object.
> 
> The idea is that there will be a realized boolean property.  When the
> level changes, it will invoke a realize() or unrealize() method
> depending on the direction.  DeviceState will implement realize() and
> invoke init().  For unrealize(), it will invoke exit().

That's fine. Question is, who is in charge of setting the realized
property and some rules of what do we put in initfn and what in realize.
Take the CPU, should CPU reset be done in realize or initfn? realize
might overwrite values set by the user after initfn but would provide us
with a reproducible state wrt reboot.

Starting the VCPU thread would definitely be for realize, but currently
this is all done from cpu_*_init() and having sequential calls to initfn
and realize doesn't offer any advantage over doing it all in initfn.

So given we do the split, who knows about these objects to call their
realize function? Will there be some global QOM logic that calls realize
on all objects instantiated so far (any ordering constraints then?) or
is everyone themselves responsible for making this work, i.e. must I
keep a global list of all CPUs initfn'ed to have their realize method
called later?

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2012-02-07 18:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-06 19:25 [Qemu-devel] KVM call agenda for Tuesday 7 Juan Quintela
2012-02-07 13:45 ` Andreas Färber
2012-02-07 13:52   ` Paolo Bonzini
2012-02-07 14:56     ` Anthony Liguori
2012-02-07 15:21       ` Paolo Bonzini
2012-02-07 16:24         ` Anthony Liguori
2012-02-07 16:27           ` Paolo Bonzini
2012-02-07 16:33             ` Anthony Liguori
2012-02-07 16:40               ` Peter Maydell
2012-02-07 17:04               ` Paolo Bonzini
2012-02-07 16:41         ` Andreas Färber
2012-02-07 16:53           ` Anthony Liguori
2012-02-07 18:01   ` Anthony Liguori
2012-02-07 18:17     ` Andreas Färber [this message]
2012-02-07 19:06       ` Anthony Liguori
2012-02-07 14:23 ` Juan Quintela

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=4F316AB8.1060207@suse.de \
    --to=afaerber@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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).