On 18 December 2014 at 14:46, Alexander Graf <ag...@suse.de> wrote:
> On 18.12.14 14:54, Mark Cave-Ayland wrote:
>> So it looks like several of the device MemoryRegions aren't being added
>> after the "loadvm". Does this mean there is an object lifecycle issue
>> here in that some of the initialisation needs to be done in realizefn
>> rather than initfn or vice-versa?
>
> I always thought we're going through both - initfn and realizefn with
> normal system boot as well as vmstate load.

Yes. Migration incoming and vmstate load both work as "create,
initialize, realize and reset system as normal, then do state
load before running it".

> So that means that the additional mappings above must be runtime
> creations that aren't saved and restored properly.

Looks likely. Memory regions themselves don't have any saved or
reloaded state, so it's the responsibility of the devices that
create and control them to ensure that they're set up correctly
again on state load. This is trivial for most devices which
just have an unchanging set, but controller chip equivalents
that allow the guest to map and unmap stuff need to be cleverer.

-- PMM

Reply via email to