- 06 2月, 2015 2 次提交
-
-
由 Dr. David Alan Gilbert 提交于
Mostly on the load side, so that when we get a complaint about a migration failure we can figure out what it didn't like. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
Convert a bunch of fprintfs to error_reports Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 16 12月, 2014 1 次提交
-
-
由 Dr. David Alan Gilbert 提交于
The migration code now occupies a fair chunk of the top level .c files, it seems time to give it it's own directory. I've not touched: arch_init.c - that's mostly RAM migration but has a few random other bits savevm.c - because it's built target specific This is purely a code move; no code has changed. - it fails checkpatch because of old violations, it feels safer to keep this as purely a move and fix those at some mythical future date. The xbzrle and vmstate tests are now only run for softmmu builds since they require files in the migrate/ directory which is only built for softmmu. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
- 14 10月, 2014 1 次提交
-
-
由 Alexey Kardashevskiy 提交于
This extends use of VMS_ALLOC flag from arrays to VBUFFER as well. This defines VMSTATE_VBUFFER_ALLOC_UINT32 which makes use of VMS_ALLOC and uses uint32_t type for a size. Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 27 6月, 2014 1 次提交
-
-
由 Alexey Kardashevskiy 提交于
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: NAlexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: NJuan Quintela <quintela@redhat.com> [agraf: drop g_malloc_n usage] Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 24 6月, 2014 1 次提交
-
-
由 Juan Quintela 提交于
If there is an error while loading a field, we should stop reading and not continue with the rest of fields. And we should also set an error in qemu_file. Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
-
- 06 5月, 2014 2 次提交
-
-
由 Peter Maydell 提交于
At the moment we require vmstate definitions to set minimum_version_id_old to the same value as minimum_version_id if they do not provide a load_state_old handler. Since the load_state_old functionality is required only for a handful of devices that need to retain migration compatibility with a pre-vmstate implementation, this means the bulk of devices have pointless boilerplate. Relax the definition so that minimum_version_id_old is ignored if there is no load_state_old handler. Note that under the old scheme we would segfault if the vmstate specified a minimum_version_id_old that was less than minimum_version_id but did not provide a load_state_old function, and the incoming state specified a version number between minimum_version_id_old and minimum_version_id. Under the new scheme this will just result in our failing the migration. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Michael S. Tsirkin 提交于
CVE-2013-4531 cpreg_vmstate_indexes is a VARRAY_INT32. A negative value for cpreg_vmstate_array_len will cause a buffer overflow. VMSTATE_INT32_LE was supposed to protect against this but doesn't because it doesn't validate that input is non-negative. Fix this macro to valide the value appropriately. The only other user of VMSTATE_INT32_LE doesn't ever use negative numbers so it doesn't care. Reported-by: NAnthony Liguori <anthony@codemonkey.ws> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 05 5月, 2014 2 次提交
-
-
由 Michael S. Tsirkin 提交于
Can be used to verify a required field exists or validate state in some other way. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Michael S. Tsirkin 提交于
move size offset and number of elements math out to functions, to reduce code duplication. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 27 3月, 2014 1 次提交
-
-
由 Alexey Kardashevskiy 提交于
This replaces DPRINTF macro with tracepoints. This moves some messages from migration.c to savevm.c. This adds tracepoint to signal about fileds failed to migrate. Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
- 25 2月, 2014 1 次提交
-
-
由 Dr. David Alan Gilbert 提交于
Fix comparison of vmstate_info_int32_le so that it succeeds if loaded value is (l)ess than or (e)qual When the comparison succeeds, assign the value loaded This is a change in behaviour but I think the original intent, since the idea is to check if the version/size of the thing you're loading is less than some limit, but you might well want to do something based on the actual version/size in the file Fix up comment and name text Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 13 1月, 2014 1 次提交
-
-
由 Eduardo Habkost 提交于
This will allow unit tests to be written for VMState code without pulling dependencies from the savevm code. Signed-off-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NOrit Wasserman <owasserm@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-