qemu-patch-raspberry4/include
Alexey Kardashevskiy f32935ea22 vmstate: Add preallocation for migrating arrays (VMS_ALLOC flag)
There are few helpers already to support array migration. However they all
require the destination side to preallocate arrays before migration which
is not always possible due to unknown array size as it might be some
sort of dynamic state. One of the examples is an array of MSIX-enabled
devices in SPAPR PHB - this array may vary from 0 to 65536 entries and
its size depends on guest's ability to enable MSIX or do PCI hotplug.

This adds new VMSTATE_VARRAY_STRUCT_ALLOC macro which is pretty similar to
VMSTATE_STRUCT_VARRAY_POINTER_INT32 but it can alloc memory for migratign
array on the destination side.

This defines VMS_ALLOC flag for a field.

This changes vmstate_base_addr() to do the allocation when receiving
migration.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
[agraf: drop g_malloc_n usage]
Signed-off-by: Alexander Graf <agraf@suse.de>
2014-06-27 13:48:27 +02:00
..
block qapi event: convert other BLOCK_JOB events 2014-06-23 11:12:28 -04:00
disas disas: Implement disassembly output for A64 2014-02-08 14:50:48 +00:00
exec tcg-ppc: Use uintptr_t in ppc_tb_set_jmp_target 2014-06-23 07:29:30 -07:00
fpu fpu: softfloat: drop INLINE macro 2014-06-23 11:00:12 -04:00
hw xics: Implement xics_ics_free() 2014-06-27 13:48:26 +02:00
libdecnumber libdecnumber: Introduce decNumberIntegralToInt64 2014-06-16 13:24:29 +02:00
migration vmstate: Add preallocation for migrating arrays (VMS_ALLOC flag) 2014-06-27 13:48:27 +02:00
monitor qapi event: clean up 2014-06-23 11:12:28 -04:00
net Add new vhost-user netdev backend 2014-06-19 16:41:57 +03:00
qapi qapi: add event helper functions 2014-06-23 11:01:25 -04:00
qemu Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging 2014-06-24 13:06:13 +01:00
qom qom: introduce object_property_get_enum and object_property_get_uint16List 2014-06-19 18:44:19 +03:00
sysemu qemu-char: make writes thread-safe 2014-06-23 11:12:28 -04:00
ui console: move chardev declarations to sysemu/char.h 2014-06-23 10:56:20 +01:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h target-ppc: Support little-endian PPC64 in user mode. 2014-06-16 13:24:40 +02:00
glib-compat.h glib-compat.h: add new thread API emulation on top of pre-2.31 API 2014-06-10 07:44:01 +02:00
qemu-common.h util: add return value to qemu_iovec_concat_iov 2014-06-18 08:47:10 +02:00
qemu-io.h qemu-io: Fix warnings from static code analysis 2014-03-13 14:42:24 +01:00
trace.h build: some simplifications for "trace/Makefile.objs" 2013-01-12 18:42:51 +01:00