vmstate: Define VARRAY with VMS_ALLOC
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Wed, 1 Jun 2016 08:57:32 +0000 (18:57 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 7 Jun 2016 00:17:45 +0000 (10:17 +1000)
commit705124ea6dca3ebfa13afddac9ce9475caf981a6
tree4949467977519c56d16f8899a9b08b191be29899
parent44f2e6c10eb2bf5dc3e36372ed574f71e80dba30
vmstate: Define VARRAY with VMS_ALLOC

This allows dynamic allocation for migrating arrays.

Already existing VMSTATE_VARRAY_UINT32 requires an array to be
pre-allocated, however there are cases when the size is not known in
advance and there is no real need to enforce it.

This defines another variant of VMSTATE_VARRAY_UINT32 with WMS_ALLOC
flag which tells the receiving side to allocate memory for the array
before receiving the data.

The first user of it is a dynamic DMA window which existence and size
are totally dynamic.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
include/migration/vmstate.h