qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Semantics of DeviceState::realized and BlockDriverState


From: Kevin Wolf
Subject: Re: [Qemu-devel] Semantics of DeviceState::realized and BlockDriverState
Date: Tue, 12 Jun 2012 10:02:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]