qemu-devel
[Top][All Lists]
Advanced

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

RE: [PATCH v1] migration: fix migrate_params_test_apply to set the dest


From: Wang, Wei W
Subject: RE: [PATCH v1] migration: fix migrate_params_test_apply to set the dest param correctly
Date: Tue, 30 May 2023 08:58:25 +0000

On Monday, May 29, 2023 10:58 PM, Peter Xu wrote:
> >
> > #1    migrate_params_test_apply(params, &tmp);
> >
> >  #2   if (!migrate_params_check(&tmp, errp)) {
> >         /* Invalid parameter */
> >         return;
> >     }
> >  #3  migrate_params_apply(params, errp);
> >
> > #2 tries to do params check using tmp, which is expected to be set up
> > by #1, but #1 didn't use "&tmp",
> 
> #1 initialized "&tmp" with current parameters, here:
> 
>     *dest = migrate_get_current()->parameters;
> 
> ?

Yes. Sorry, I had a misunderstanding of this one. All the has_* of
the current params has been initialized to true at the beginning.
(I once dumped tmp after migrate_params_test_apply, it were all 0,
which drove me to make the changes, but couldn't reproduce it now
- things appear to be correct without this patch)

reply via email to

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