On Wed, 24 Jul 2019 at 15:36, Damien Hedde <damien.he...@greensocs.com> wrote:
>
> Fix the pl330 main and queue vmstate description.
> There were missing POINTER flags causing crashes during
> incoming migration because:
> + PL330State chan field is a pointer to an array
> + PL330Queue queue field is a pointer to an array
>
> Also bump corresponding vmsd version numbers.
>
> Signed-off-by: Damien Hedde <damien.he...@greensocs.com>
> ---
>
> I found this while working on reset with xilinx-zynq machine.
>
> I'm not sure what's the vmsd version policy in such cases (for
> backward compatibility). I've simply bumped them since migration
> was not working anyway (vmstate_load_state was erasing critical part
> of PL330State and causing segfaults while loading following fields).
>
> Tested doing migration with the xilinx-zynq-a9 machine.

Reviewed-by: Peter Maydell <peter.mayd...@linaro.org>

I worked out that we can catch this category of bug by adding
type-checking to the VMSTATE_STRUCT_VARRAY_UINT32 macro and
friends that ensures that the passed in field name is really
an array and not a pointer. This also caught at least one
other bug of the same type...patches to follow later.

thanks
-- PMM

Reply via email to