History | View | Annotate | Download (45.7 kB)
live migration: Serialize vmstate saving in stage 2
The effect of this patch with current block migration is that its stage2, ie. the first full walk-through of the block devices will beperformed completely before RAM migration starts. This ensures that...
live migration: Allow cleanup after cancellation or error
Introduce qemu_savevm_state_cancel and inject a stage -1 to cancel alive migration. This gives the involved subsystems a chance to clean updynamically allocated resources. Namely, the block migration layer can...
live migration: Propagate output monitor to callback handler
In order to allow proper progress reporting to the monitor thatinitiated the migration, forward the monitor reference through themigration layer down to SaveLiveStateHandler.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
vmstate: Add support for VBUFFERS
Support for buffer that are pointed by a pointer (i.e. not embedded)where the size that we want to use is a field in the state.We also need a new place to store where to start in the middle of thebuffer, as now it is a pointer, not the offset of the 1st field....
vmstate: Add support for multiplying size for a constant
When the size that we want to transmit is in another field, but in anunit different that bytes
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: Avoid seeking
Seeking on vmstate save/load does not work if the underlying file is astream. We could try to make all QEMUFile* forward-seek-aware, but firstattempts in this direction indicated that it's saner to convert the fewqemu_fseek-on-vmstates users to plain reads/writes....
vmstate: fix missing ARRAY_OF_POINTERS support on save state
net: fix qemu_announce_self()
Now that we have a way to iterate NICs.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add support for GNU/kFreeBSD
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Block live migration
This patch introduces block migration called during live migration. Blockare being copied to the destination in an async way. First the code willtransfer the whole disk and then transfer all dirty blocks accumulted duringthe migration....
Fix incoming migration
commit b04c4134d6de28c249277de19e523bfbe4aebbd6broke incoming migration. After talking with Gleb, code was intendedto be the way is in this fix. This fixes migration here.
savevm: Delete existing snapshots in all images
When creating a snapshot we can run into the situation that the first diskdoesn't have a snapshot, but the second one does have one with the same name asthe new snapshot.
In this case, qemu doesn't recognize that there is a snapshot to be...
net: use qemu_send_packet_raw() in qemu_announce_self()
Use qemu_send_packet_raw to send gratuitous arp. This will ensure thatvnet header is handled properly.
Also, avoid sending the gratuitous packet to the guest. There doesn'tappear to be any reason for doing that and the code will currently just...
net: remove unused includes of if_tun.h and if_tap.h
Looks like these are just artifacts of vl.c being split up.
vmstate: add VMS_VARRAY_UINT16_UNSAFE (varrays with uint16 indexes)
It don't check types.Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: Add VMSTATE_BUFFER_UNUSED
It allows to have 'things' in savevm format not backed in the device stateSigned-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: Rename VMS_VARRAY to VMS_VARRAY_INT32
vnmstate: fix name for uint8_equal
vmstate: add VMSTATE_UINT16_EQUAL[_V]
Send a RARP packet after migration.
Currently, after a migration qemu sends a broadcast packet to updateswitches' MAC->port mappings.
Unfortunately, it picks a random (constant) ethertype and crosses itsfingers that no one else is using it.
This patch causes it to send a RARP packet instead. RARP was chosen for...
net: use qtailq for vlan and client lists
Patchworks-ID: 35507Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: Add suppot for field_exist() test
vmstate: add support for arrays of pointers
We need this to send arrays of timers
vmstate: remove const for put operations
In a later patch, we introduce pre_save() and post_save() functions.The whole point of that operation is to change things in the state.Without this patch, we have to remove the const qualifier in eachuse with a cast...
vmstate: add version_id argument to post_load
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
Include sys-queue.h early to override system queue definitions on BSD
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
vmstate: add support for uint8_t equal
vmstate: add sensible arguments to vmstate_unregister()
vmsd alone is not enugh, because we can have several structs saved with the same description (vmsd).
vmstate: rename run_after_load() -> post_load()
This naming was used in kvm tree, and is easier to remember
vmstate: Add pre_load() hook
vmstate: Add pre/post_save() hooks
Remove SaveVM v2 support
In previosu series I remove v2 support for RAM (that was the version that wassupported when SaveVM v3 appeared). Now we can't load RAM for any image saved in SaveVM v2, we can as well remove SaveVM v2 entirely.
Note: That SaveVM RAM was at v2 when General SaveVM support went from v2 to v3 makes talking about versions confusing at least...
savevm: Convert savevm handlers list to TAILQ
savevm: Convert loadvm handlers list to LIST
monitor: Port handler_1 to use QDict
This commit ports command handlers that receive one argument to usethe new monitor's dictionary.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
VMState: Fix sub-structs versioning
We can't check the version in a substruct, it is not stored anywhere
Add VMState support for variable sized arrays
This patch add supports for variable sized arrays whose size isanother field of the state.
Add VMState support for static sized buffers (uint_8)
This patch adds support for static sized buffer and typecheks that the buffer is right.
Add VMState support for int32_t check value
We read the saved value and check that it is less or equal than the onestored in the structure.
Add VMState support to run a function after load
Use return value from load_state() call back
Add vmstate_load() and vmstate_save() functions
New VMstate save/load infrastructure
This patch introduces VMState infrastructure, to convert the save/loadfunctions of devices to a table approach. This new approach has thefollowing advantages:- it is type-safe- you can't have load/save functions out of sync...
Add VMState support for pointers
This patch adds support for saving pointers to values
Add VMState support for arrays
This patch adds support for saving arrays inside the struct
Add VMState support for structs
This patch adds support for saving one VMStateDescription from otherVMStateDescription.
We read the saved value and check that it is the same that the oneis stored in the structure.
split do_loadvm() into do_loadvm() and load_vmstate()
do_loadvm() is now called from the monitor.load_vmstate() is called by do_loadvm() and when -loadvm command line is used.Command line don't have to play games with vmstop()/vmstart()
Signed-off-by: Juan Quintela <quintela@redhat.com>...
move do_loadvm() to monitor.c
make load_vmstate() return errors
add file descriptor migration
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Cc: Chris Lalancette <clalance@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
unify popen/fopen qemu wrappers
While reading Chris's code for fd migration I noticed the duplicationbetween QEMUFilePopen and QEMUFileStdio. This fixes it, and makesqemu_fopen more similar qemu_popen.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
rename HOST_BSD to CONFIG_BSD
kill drives_table
First step cleaning up the drives handling. This one does nothing butremoving drives_table[], still it became seriously big.
drive_get_index() is gone and is replaced by drives_get() which handsout DriveInfo pointers instead of a table index. This needs adaption in...
fix segfault in setting migration speed
Hi,
Whoever wrote this migrate_set_speed function is totally stupid.
Any failed or completed migration keeps its state to allow probing ofmigration data, but has no associated file anymore. It is, thus,possible to crash qemu by calling migrate_set_speed after a migration...
replace bdrv_{get, put}_buffer with bdrv_{load, save}_vmstate
The VM state offset is a concept internal to the image format. Replacethe old bdrv_{get,put}_buffer method that require an index into theimage file that is constructed from the VM state offset and an offset...
exec-migration: handle EINTR in popen_get_buffer()
Sometimes, upon interrupt, fread returns with no data, andthe (incoming exec) migration fails.
Fix by retrying on such a case.
Signed-off-by: Uri Lublin <uril@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix mingw32 build warnings
Work around buffer and ioctlsocket argument type signedness problemsSuppress a prototype which is unused on mingw32Expand a macro to avoid warnings from some GCC versions
net: re-name vc->fd_read() to vc->receive()
VLANClientState's fd_read() handler doesn't read from filedescriptors, it adds a buffer to the client's receive queue.
Re-name the handlers to make things a little less confusing.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
net: pass VLANClientState* as first arg to receive handlers
Give static type checking a chance to catch errors.
Allow monitor interaction when using migrate -exec
All, I've recently been playing around with migration via exec. Unfortunately,when starting the incoming qemu process with "-incoming exec:cmd", it suffersthe same problem that -incoming tcp used to suffer; namely, that you can't...
introduce set_rate_limit function for QEMUFile
This patch converts the current callers of qemu_fopen_ops().
Signed-off-by: Glauber Costa <glommer@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Minimal ethernet frame length is 64 bytes.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Don't send all gratuitous packets at once.
Use timer to separate them in time.
Make sure not to fall through on error in loadvm
This is from the KVM tree
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add unregister_savevm() (Mark McLoughlin)
Currently there's no way to unregister a savevm callback, soe.g. if a NIC is hot-unplugged and a savevm is issued, we'llsegfault.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
create qemu_file_set_error (Glauber Costa)
This is mainly for consistency, since we don't wantanything outside of savevm setting it explicitly. Thereare current no users of that in qemu tree, but thereare potential candidates on kvm-userspace. And avi...
Fix savevm after BDRV_FILE size enforcement
We now enforce that you cannot write beyond the end of a non-growable file.qcow2 files are not growable but we rely on them being growable to dosavevm/loadvm. Temporarily allow them to be growable by introducing a new...
make qemu_announce_self handle non contiguous net tables (Marcelo Tosatti)
With hotplug nd_table might contain holes.
Noticed by Eduardo Habkost.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Fix windows build and clean up use of <windows.h>
We want to globally define WIN_LEAN_AND_MEAN and WINVER to particular values solet's do it in OS_CFLAGS.
Then, we can pepper in windows.h includes where using #includes that require it.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Rename _BSD to HOST_BSD so that it's more obvious that it's defined by configure
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6775 c046a42c-6fe2-441c-8c8c-71466251a162
Support for DragonFly BSD (Hasso Tepper)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6746 c046a42c-6fe2-441c-8c8c-71466251a162
Fix BSD breakage from r6736
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6742 c046a42c-6fe2-441c-8c8c-71466251a162
Sparse fixes: NULL use, header order, ANSI prototypes, static
Fix Sparse warnings: * use NULL instead of plain 0 * rearrange header include order to avoid redefining types accidentally * ANSIfy SLIRP * avoid "restrict" keyword * add static
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6736 c046a42c-6fe2-441c-8c8c-71466251a162
monitor: Rework API (Jan Kiszka)
Refactor the monitor API and prepare it for decoupled terminals:term_print functions are renamed to monitor_* and all monitor servicesgain a new parameter (mon) that will once refer to the monitor instancethe output is supposed to appear on. However, the argument remains...
toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6531 c046a42c-6fe2-441c-8c8c-71466251a162
Fix handling of disk-only snapshots (Kevin Wolf)
When creating a snapshot with multiple qcow2 disks attached, the currentbehaviour is that qemu creates a disk snapshot on all of them andchooses one to write the VM state to.
Despite having the state only in one image, loadvm tries to restore the...
Split savevm code into savevm.c
This is pure code motion. The savevm code is all common code so we can buildit once and share the object with all executables.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5700 c046a42c-6fe2-441c-8c8c-71466251a162