On Fri, Apr 25, 2014 at 07:47:09PM -0300, Marcelo Tosatti wrote:
> 
> Check vmsd for unmigratable field, allowing migratibility status
> to be modified after vmstate_register.
> 
> Signed-off-by: Marcelo Tosatti <mtosa...@redhat.com>
> 
> diff --git a/savevm.c b/savevm.c
> index 22123be..61a25c0 100644
> --- a/savevm.c
> +++ b/savevm.c
> @@ -452,7 +452,7 @@ bool qemu_savevm_state_blocked(Error **errp)
>      SaveStateEntry *se;
>  
>      QTAILQ_FOREACH(se, &savevm_handlers, entry) {
> -        if (se->no_migrate) {
> +        if (se->no_migrate || (se->vmsd && se->vmsd->unmigratable)) {

The only place where se->no_migrate is set to non-zero is when a vmsd is
provided. What about just removing the field and using
(se->vmsd && se->vmsd->unmigratable) only?

-- 
Eduardo

Reply via email to