qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Stefan Hajnoczi" <stefanha@linux.vnet.ibm.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] Semantics of DeviceState::realized and BlockDriverState
Date: Tue, 12 Jun 2012 10:02:42 +0200	[thread overview]
Message-ID: <4FD6F7A2.6000203@redhat.com> (raw)
In-Reply-To: <4FD66B8F.4080203@codemonkey.ws>

Am 12.06.2012 00:05, schrieb Anthony Liguori:
> To me, realized represents Vcc.  When realized=true, the guest has power and is 
> active.  When realized=false, the guest has lost power.  The realize() event is 
> the rising edge of Vcc, unrealized() is the falling edge.
> 
> realize() should be used to take any actions that require all parameters to be 
> set that need to happen before the guest has power.  This later clause is 
> extremely important.  unrealize() should be used to unset anything setup in 
> realize().

The one thing I'm really unsure about is whether you're combining two
different things into one concept: This Vcc concept and Andreas' OOP
concept (which is btw the same as I understood realize before we
discussed yesterday on IRC - I guess you must have explained it as such
at some point).

Is it really always the power-on event that causes the final check of
properties, setup of device state and makes some properties read-only?
Or is that just a coincidence and happens to be true only with some devices?

> The destructor being invoked does not imply that unrealize() has happened.

Which makes some sense in your Vcc model, but doesn't at all in the OOP
concept model.

Kevin

  parent reply	other threads:[~2012-06-12  8:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11 22:05 [Qemu-devel] Semantics of DeviceState::realized and BlockDriverState Anthony Liguori
2012-06-12  0:29 ` Andreas Färber
2012-06-12  1:26   ` Anthony Liguori
2012-06-12  6:10 ` Paolo Bonzini
2012-06-12  8:07   ` Kevin Wolf
2012-06-12  8:02 ` Kevin Wolf [this message]
2012-06-13 12:53 ` Markus Armbruster
2012-06-13 12:55   ` Paolo Bonzini
2012-06-13 13:18   ` Anthony Liguori
2012-06-13 15:44   ` Kevin Wolf

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=4FD6F7A2.6000203@redhat.com \
    --to=kwolf@redhat.com \
    --cc=afaerber@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.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).