diff options
author | Halil Pasic | 2017-02-03 18:52:17 +0100 |
---|---|---|
committer | Dr. David Alan Gilbert | 2017-02-13 18:27:13 +0100 |
commit | 59046ec29ad4c24391bb9fe1fbdced33557aaa70 (patch) | |
tree | a3f0ec57065500119bc1d2f1a3cd195728dcfcb2 /migration/vmstate.c | |
parent | migrate: Introduce zero RAM checks to skip RAM migration (diff) | |
download | qemu-59046ec29ad4c24391bb9fe1fbdced33557aaa70.tar.gz qemu-59046ec29ad4c24391bb9fe1fbdced33557aaa70.tar.xz qemu-59046ec29ad4c24391bb9fe1fbdced33557aaa70.zip |
migration: consolidate VMStateField.start
The member VMStateField.start is used for two things, partial data
migration for VBUFFER data (basically provide migration for a
sub-buffer) and for locating next in QTAILQ.
The implementation of the VBUFFER feature is broken when VMSTATE_ALLOC
is used. This however goes unnoticed because actually partial migration
for VBUFFER is not used at all.
Let's consolidate the usage of VMStateField.start by removing support
for partial migration for VBUFFER.
Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Message-Id: <20170203175217.45562-1-pasic@linux.vnet.ibm.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration/vmstate.c')
-rw-r--r-- | migration/vmstate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/migration/vmstate.c b/migration/vmstate.c index 2b2b3a58e6..520341a2de 100644 --- a/migration/vmstate.c +++ b/migration/vmstate.c @@ -68,10 +68,10 @@ static void *vmstate_base_addr(void *opaque, VMStateField *field, bool alloc) } } if (size) { - *((void **)base_addr + field->start) = g_malloc(size); + *(void **)base_addr = g_malloc(size); } } - base_addr = *(void **)base_addr + field->start; + base_addr = *(void **)base_addr; } return base_addr; |