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