All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] Semantics of DeviceState::realized and BlockDriverState
Date: Mon, 11 Jun 2012 20:26:26 -0500	[thread overview]
Message-ID: <4FD69AC2.8040903@codemonkey.ws> (raw)
In-Reply-To: <4FD68D52.8020304@suse.de>

On 06/11/2012 07:29 PM, Andreas Färber wrote:
> Am 12.06.2012 00:05, schrieb Anthony Liguori:
>> I think I'm becoming convinced that realized belongs in DeviceState and
>> that BlockDriverState does not have a realized equivalent.
>
>> 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.
>
> Then please name it appropriately: "powered" and "unpowered".
>
> Realization has nothing to do with power, it's an OOP term that
> distinguishes from instantiation.

Eh?  I'm not familiar with it as a OOP term.

> The way this discussion has headed is very unfortunate for me since I
> need such a hook for the CPUs today and not in a far future when the
> whole of qdev has been refactored to match the QOM type / inheritance

I warned you early on that CPUs were not the best place to start...

I think the fundamental problem is that CPU wants to be a TYPE_DEVICE.  We 
probably shouldn't have started with it as TYPE_OBJECT.

I think that's really the immediate problem that needs to be solved.  I think 
avoiding making it TYPE_DEVICE is what's caused us to attempt to push realized 
into Object in the first place.

Regards,

Anthony Liguori

  reply	other threads:[~2012-06-12  1:26 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 [this message]
2012-06-12  6:10 ` Paolo Bonzini
2012-06-12  8:07   ` Kevin Wolf
2012-06-12  8:02 ` Kevin Wolf
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=4FD69AC2.8040903@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=afaerber@suse.de \
    --cc=kwolf@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.