- 09 3月, 2015 1 次提交
-
-
由 David Gibson 提交于
Currently, vmstate.h includes helper macro variants for 8, 16 and 32-bit unsigned integers which include a "test" function which can selectively enable or disable the field's presence in the migration stream. There aren't similar helpers for 64-bit unsigned integers, or any size of signed integers. This patch remedies this. Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 10 2月, 2015 1 次提交
-
-
由 Stefan Weil 提交于
Warning from the Sparse static analysis tool: stubs/vmstate.c:4:26: warning: symbol 'vmstate_dummy' was not declared. Should it be static? Cc: Juan Quintela <quintela@redhat.com> Cc: Amit Shah <amit.shah@redhat.com> Signed-off-by: NStefan Weil <sw@weilnetz.de> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 06 2月, 2015 1 次提交
-
-
由 Alexander Graf 提交于
One of the annoyances of the current migration format is the fact that it's not self-describing. In fact, it's not properly describing at all. Some code randomly scattered throughout QEMU elaborates roughly how to read and write a stream of bytes. We discussed an idea during KVM Forum 2013 to add a JSON description of the migration protocol itself to the migration stream. This patch adds a section after the VM_END migration end marker that contains description data on what the device sections of the stream are composed of. This approach is backwards compatible with any QEMU version reading the stream, because QEMU just stops reading after the VM_END marker and ignores any data following it. With an additional external program this allows us to decipher the contents of any migration stream and hopefully make migration bugs easier to track down. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 26 1月, 2015 2 次提交
-
-
由 Paolo Bonzini 提交于
Old users of VMSTATE_TIMER* are mechanically changed to VMSTATE_TIMER_PTR variants. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
After the next patch, each vmstate field will extract parts of a larger (32x512-bit) array, so we cannot check the vmstate field against the type of the array. While changing this, change the macros to accept the index of the first element (which will not be 0 for Hi16_ZMM_REGS) instead of the number of elements (which is always CPU_NB_REGS). Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 16 1月, 2015 1 次提交
-
-
由 Paolo Bonzini 提交于
While we cannot check against the type of the full array, we can check against the type of the fields. Signed-off-by: NPaolo Bonzini <pbonzini@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 次提交
-
-
由 Amit Shah 提交于
This commit adds a new command, '-dump-vmstate', that takes a filename as an argument. When executed, QEMU will dump the vmstate information for the machine type it's invoked with to the file, and quit. The JSON-format output can then be used to compare the vmstate info for different QEMU versions, specifically to test whether live migration would break due to changes in the vmstate data. A Python script that compares the output of such JSON dumps is included in the following commit. Signed-off-by: NAmit Shah <amit.shah@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 19 6月, 2014 2 次提交
-
-
由 Jason Wang 提交于
This patch introduces self_announce_delay() to calculate the delay for the next announce round. This could be used by other device e.g virtio-net who wants to do announcing by itself. Signed-off-by: NJason Wang <jasowang@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Jason Wang 提交于
Export it for other users. Signed-off-by: NJason Wang <jasowang@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 06 5月, 2014 1 次提交
-
-
由 Michael S. Tsirkin 提交于
As the macro verifies the value is positive, rename it to make the function clearer. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 05 5月, 2014 2 次提交
-
-
由 Michael S. Tsirkin 提交于
Validate state using VMS_ARRAY with num = 0 and VMS_MUST_EXIST Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 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>
-
- 14 3月, 2014 1 次提交
-
-
由 Fam Zheng 提交于
c5f52875 changed the size of sense array in vmstate_scsi_device by mistake. This patch restores the old size, and add a subsection for the remaining part of the buffer size. So that migration is not broken. Signed-off-by: NFam Zheng <famz@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 08 2月, 2014 1 次提交
-
-
由 Christoffer Dall 提交于
Add support for saving VMState of 2D arrays of uint32 values. Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 04 2月, 2014 1 次提交
-
-
由 Peter Maydell 提交于
The VMSTATE_STRUCT_POINTER macros are a bit odd in that they must be passed an argument "FooType *" rather than just taking the FooType. They're only used in one place, so it's easy to tidy this up. This also lets us use the macro to replace the hand-rolled VMSTATE_PTIMER. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 18 12月, 2013 1 次提交
-
-
由 Peter Maydell 提交于
Add support for defining a vmstate field which is an array of pointers to structures, and use this to define a VMSTATE_PTIMER_ARRAY() which allows an array of ptimer_state* to be used by devices. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Message-id: 1387159292-10436-2-git-send-email-lig.fnst@cn.fujitsu.com
-
- 24 9月, 2013 1 次提交
-
-
由 Alexey Kardashevskiy 提交于
This adds version supporting macros VMSTATE_STRUCT_POINTER_TEST_V and VMSTATE_STRUCT_POINTER_V in addition to the already existing VMSTATE_STRUCT_POINTER and VMSTATE_STRUCT_POINTER_TEST macros. Cc: Andreas Färber <afaerber@suse.de> Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 28 6月, 2013 1 次提交
-
-
由 Peter Maydell 提交于
Fix compilation failures for linux-user targets following recent migration related commits bd2fa51f and 43487c67. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Message-id: 1372362818-4740-1-git-send-email-peter.maydell@linaro.org Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 05 4月, 2013 2 次提交
-
-
由 Peter Maydell 提交于
Add support for migrating two dimensional arrays, by defining a set of new macros VMSTATE_*_2DARRAY paralleling the existing VMSTATE_*_ARRAY macros. 2D arrays are handled the same for actual state serialization; the only difference is that the type check has to change for a 2D array. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NIgor Mitsyanko <i.mitsyanko@gmail.com> Message-id: 1363975375-3166-2-git-send-email-peter.maydell@linaro.org
-
由 Igor Mitsyanko 提交于
Macro could be used to migrate a dynamically allocated buffer of known size. Signed-off-by: NIgor Mitsyanko <i.mitsyanko@gmail.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Message-id: 1362923278-4080-2-git-send-email-i.mitsyanko@gmail.com Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 26 3月, 2013 5 次提交
-
-
由 David Gibson 提交于
The VMSTATE_BUFFER_MULTIPLY macro is misnamed - it actually specifies a variably sized buffer with VMS_VBUFFER, so should be named VMSTATE_VBUFFER_MULTIPLY. This patch fixes this (the macro had no current users under either name). In addition, unlike the other VMSTATE_VBUFFER variants, this macro did not specify VMS_POINTER. This patch fixes this bug as well. Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 David Gibson 提交于
Currently the savevm code contains a VMSTATE_STRUCT_VARRAY_POINTER_INT32 helper (a variably sized array with the number of elements in an int32_t), but not VMSTATE_STRUCT_VARRAY_POINTER_UINT32 (... with the number of elements in a uint32_t). This patch (trivially) fixes the deficiency. Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 David Gibson 提交于
The current savevm code includes VMSTATE helpers for a number of commonly used data types, but not for the float64 type used by the internal floating point emulation code. This patch fixes the deficiency. Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 David Gibson 提交于
This adds an _EQUAL VMSTATE helper for target_ulongs, defined in terms of VMSTATE_UINT32_EQUAL or VMSTATE_UINT64_EQUAL as appropriate. Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 David Gibson 提交于
The savevm code already includes a number of *_EQUAL helpers which act as sanity checks verifying that the configuration of the saved state matches that of the machine we're loading into to work. Variants already exist for 8 bit 16 bit and 32 bit integers, but not 64 bit integers. This patch fills that hole, adding a UINT64 version. Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 12 3月, 2013 2 次提交
-
-
由 Andreas Färber 提交于
Reviewed-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
This avoids adding a duplicate stub for CONFIG_USER_ONLY. Suggested-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 11 3月, 2013 3 次提交
-
-
由 Paolo Bonzini 提交于
Only the migration_bitmap_sync() call needs the iothread lock. Reviewed-by: NOrit Wasserman <owasserm@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Paolo Bonzini 提交于
This makes it possible to do blocking writes directly to the socket, with no buffer in the middle. For RAM, only the migration_bitmap_sync() call needs the iothread lock. For block migration, it is needed by the block layer (including bdrv_drain_all and dirty bitmap access), but because some code is shared between iterate and complete, all of mig_save_device_dirty is run with the lock taken. In the savevm case, the iterate callback runs within the big lock. This is annoying because it complicates the rules. Luckily we do not need to do anything about it: the RAM iterate callback does not need the iothread lock, and block migration never runs during savevm. Reviewed-by: NOrit Wasserman <owasserm@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Paolo Bonzini 提交于
This groups together the callbacks that later will have similar locking rules. Reviewed-by: NOrit Wasserman <owasserm@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 01 3月, 2013 1 次提交
-
-
由 Paolo Bonzini 提交于
fifo.c is generic code that can be easily unit tested. So it belongs in libqemuutil. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 21 12月, 2012 1 次提交
-
-
由 Juan Quintela 提交于
Code just now does (simplified for clarity) if (qemu_savevm_state_iterate(s->file) == 1) { vm_stop_force_state(RUN_STATE_FINISH_MIGRATE); qemu_savevm_state_complete(s->file); } Problem here is that qemu_savevm_state_iterate() returns 1 when it knows that remaining memory to sent takes less than max downtime. But this means that we could end spending 2x max_downtime, one downtime in qemu_savevm_iterate, and the other in qemu_savevm_state_complete. Changed code to: pending_size = qemu_savevm_state_pending(s->file, max_size); DPRINTF("pending size %lu max %lu\n", pending_size, max_size); if (pending_size >= max_size) { ret = qemu_savevm_state_iterate(s->file); } else { vm_stop_force_state(RUN_STATE_FINISH_MIGRATE); qemu_savevm_state_complete(s->file); } So what we do is: at current network speed, we calculate the maximum number of bytes we can sent: max_size. Then we ask every save_live section how much they have pending. If they are less than max_size, we move to complete phase, otherwise we do an iterate one. This makes things much simpler, because now individual sections don't have to caluclate the bandwidth (it was implossible to do right from there). Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 19 12月, 2012 1 次提交
-
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 30 10月, 2012 1 次提交
-
-
由 Peter Maydell 提交于
Add support for saving/loading bitmap.h bitmaps in vmstate. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Tested-by: NIgor Mitsyanko <i.mitsyanko@samsung.com> Reviewed-by: NJuan Quintela <quintela@redhat.com>
-
- 11 9月, 2012 1 次提交
-
-
由 Paolo Bonzini 提交于
Also, for consistency with other occurrences, implement VMSTATE_TIMER as a special case of VMSTATE_TIMER_V rather than VMSTATE_TIMER_TEST. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 20 7月, 2012 3 次提交
-
-
由 Juan Quintela 提交于
We split it into 2 functions, foo_live_iterate, and foo_live_complete. At this point, we only remove the bits that are for the other stage, functionally this is equivalent to previous code. Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Juan Quintela 提交于
This patch splits stage 1 to its own function for both save_live users, ram and block. It is just a copy of the function, removing the parts of the other stages. Optimizations would came later. Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Juan Quintela 提交于
Enable the creation of a method to tell migration if that section is active and should be migrate. We use it for blk-migration, that is normally not active. We don't create the method for RAM, as setups without RAM are very strange O:-) Signed-off-by: NJuan Quintela <quintela@redhat.com>
-