On 12/04/2018 15:51, Peter Maydell wrote:
> Paolo may have an opinion what the API here should be, but
> at the MemoryRegion level we already have a mix of functions
> memory_region_init_foo_nomigrate() and memory_region_init_foo(),
> which at the moment just control whether we call
> vmstate_register_ram() or not. Is it possible to hook into that,
> so that we default to marking RAMBlocks as not-migrated, and
> when vmstate_register_ram() is called we set the flag to
> "migrated"?

Yes, that sounds pretty.


> NB: this probably requires careful thought to make sure we
> don't accidentally break migration compat, but it seems like
> the cleaner approach. At the moment we do weird things if you
> migrate a RAM block that hasn't had its ID string set, IIRC,
> so just not migrating those RAM blocks seems like a better
> plan than mishandling them. It would also mean that the
> vmstate_register/unregister_ram() functions did what they
> claim to do based on the function name, I think.

Reply via email to