Statistics
| Branch: | Revision:

root / savevm.c @ 076d2471

History | View | Annotate | Download (45.7 kB)

# Date Author Comment
5fdb3aa1 12/25/2009 08:19 pm Kirill A. Shutemov

savevm.c: fix warning with _FORTIFY_SOURCE

CC    savevm.o
cc1: warnings being treated as errors
savevm.c: In function 'file_put_buffer':
savevm.c:342: error: ignoring return value of 'fwrite', declared with attribute warn_unused_result
make: *** [savevm.o] Error 1...
90697be8 12/03/2009 07:45 pm Jan Kiszka

live migration: Serialize vmstate saving in stage 2

The effect of this patch with current block migration is that its stage
2, ie. the first full walk-through of the block devices will be
performed completely before RAM migration starts. This ensures that...

4ec7fcc7 12/03/2009 06:48 pm Jan Kiszka

live migration: Allow cleanup after cancellation or error

Introduce qemu_savevm_state_cancel and inject a stage -1 to cancel a
live migration. This gives the involved subsystems a chance to clean up
dynamically allocated resources. Namely, the block migration layer can...

f327aa0c 12/03/2009 06:48 pm Jan Kiszka

live migration: Propagate output monitor to callback handler

In order to allow proper progress reporting to the monitor that
initiated the migration, forward the monitor reference through the
migration layer down to SaveLiveStateHandler.

Signed-off-by: Jan Kiszka <>...

e61a1e0a 12/03/2009 06:04 pm Juan Quintela

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 the
buffer, as now it is a pointer, not the offset of the 1st field....

33599e2a 12/03/2009 06:04 pm Juan Quintela

vmstate: Add support for multiplying size for a constant

When the size that we want to transmit is in another field, but in an
unit different that bytes

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

21174c34 12/03/2009 06:04 pm Jan Kiszka

vmstate: Avoid seeking

Seeking on vmstate save/load does not work if the underlying file is a
stream. We could try to make all QEMUFile* forward-seek-aware, but first
attempts in this direction indicated that it's saner to convert the few
qemu_fseek-on-vmstates users to plain reads/writes....

8595387e 12/03/2009 06:04 pm Juan Quintela

vmstate: fix missing ARRAY_OF_POINTERS support on save state

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

f401ca22 12/03/2009 05:41 pm Mark McLoughlin

net: fix qemu_announce_self()

Now that we have a way to iterate NICs.

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

a167ba50 11/29/2009 07:00 pm Aurelien Jarno

Add support for GNU/kFreeBSD

Signed-off-by: Aurelien Jarno <>

c163b5ca 11/17/2009 04:49 pm lirans@il.ibm.com

Block live migration

This patch introduces block migration called during live migration. Block
are being copied to the destination in an async way. First the code will
transfer the whole disk and then transfer all dirty blocks accumulted during
the migration....

14f26b00 11/12/2009 07:23 pm Juan Quintela

Fix incoming migration

commit b04c4134d6de28c249277de19e523bfbe4aebbd6
broke incoming migration. After talking with Gleb, code was intended
to be the way is in this fix. This fixes migration here.

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

cb499fb2 11/12/2009 07:23 pm Kevin Wolf

savevm: Delete existing snapshots in all images

When creating a snapshot we can run into the situation that the first disk
doesn't have a snapshot, but the second one does have one with the same name as
the new snapshot.

In this case, qemu doesn't recognize that there is a snapshot to be...

b04c4134 10/27/2009 07:29 pm Gleb Natapov

net: use qemu_send_packet_raw() in qemu_announce_self()

Use qemu_send_packet_raw to send gratuitous arp. This will ensure that
vnet header is handled properly.

Also, avoid sending the gratuitous packet to the guest. There doesn't
appear to be any reason for doing that and the code will currently just...

1abb8172 10/27/2009 07:28 pm Mark McLoughlin

net: remove unused includes of if_tun.h and if_tap.h

Looks like these are just artifacts of vl.c being split up.

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

bdb4941d 10/27/2009 07:28 pm Juan Quintela

vmstate: add VMS_VARRAY_UINT16_UNSAFE (varrays with uint16 indexes)

It don't check types.
Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

76507c75 10/27/2009 07:28 pm Juan Quintela

vmstate: Add VMSTATE_BUFFER_UNUSED

It allows to have 'things' in savevm format not backed in the device state
Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

d6698281 10/27/2009 07:28 pm Juan Quintela

vmstate: Rename VMS_VARRAY to VMS_VARRAY_INT32

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

aa1cce69 10/27/2009 07:28 pm Juan Quintela

vnmstate: fix name for uint8_equal

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

dc3b83a0 10/27/2009 07:28 pm Juan Quintela

vmstate: add VMSTATE_UINT16_EQUAL[_V]

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

18995b98 10/27/2009 07:28 pm Nolan

Send a RARP packet after migration.

Currently, after a migration qemu sends a broadcast packet to update
switches' MAC->port mappings.

Unfortunately, it picks a random (constant) ethertype and crosses its
fingers that no one else is using it.

This patch causes it to send a RARP packet instead. RARP was chosen for...

5610c3aa 10/15/2009 05:32 pm Mark McLoughlin

net: use qtailq for vlan and client lists

Patchworks-ID: 35507
Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

f11f6a5f 10/05/2009 05:32 pm Juan Quintela

vmstate: Add suppot for field_exist() test

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

19df438b 10/05/2009 05:32 pm Juan Quintela

vmstate: add support for arrays of pointers

We need this to send arrays of timers

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

84e2e3eb 10/05/2009 05:32 pm Juan Quintela

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 each
use with a cast...

e59fb374 10/05/2009 05:32 pm Juan Quintela

vmstate: add version_id argument to post_load

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

72cf2d4f 09/12/2009 10:36 am Blue Swirl

Fix sys-queue.h conflict for good

Problem: Our file sys-queue.h is a copy of the BSD file, but there are
some additions and it's not entirely compatible. Because of that, there have
been conflicts with system headers on BSD systems. Some hacks have been
introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...

15cc9235 09/12/2009 09:19 am Blue Swirl

Include sys-queue.h early to override system queue definitions on BSD

Signed-off-by: Blue Swirl <>

80cd83e7 09/11/2009 07:10 pm Juan Quintela

vmstate: add support for uint8_t equal

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

1eb7538b 09/11/2009 07:10 pm Juan Quintela

vmstate: add sensible arguments to vmstate_unregister()

vmsd alone is not enugh, because we can have several structs saved with the same description (vmsd).

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

752ff2fa 09/11/2009 07:10 pm Juan Quintela

vmstate: rename run_after_load() -> post_load()

This naming was used in kvm tree, and is easier to remember

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

fd4d52de 09/11/2009 07:10 pm Juan Quintela

vmstate: Add pre_load() hook

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

8fb0791d 09/11/2009 07:10 pm Juan Quintela

vmstate: Add pre/post_save() hooks

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

bbfe1408 09/11/2009 06:19 pm Juan Quintela

Remove SaveVM v2 support

In previosu series I remove v2 support for RAM (that was the version that was
supported 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...

8718e999 09/09/2009 10:55 pm Juan Quintela

savevm: Convert savevm handlers list to TAILQ

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

f4dbb8dd 09/09/2009 10:55 pm Juan Quintela

savevm: Convert loadvm handlers list to LIST

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

d54908a5 09/04/2009 05:37 pm Luiz Capitulino

monitor: Port handler_1 to use QDict

This commit ports command handlers that receive one argument to use
the new monitor's dictionary.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

fa3aad24 09/04/2009 05:37 pm Juan Quintela

VMState: Fix sub-structs versioning

We can't check the version in a substruct, it is not stored anywhere

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

b00319a9 08/28/2009 04:30 am Juan Quintela

Add VMState support for variable sized arrays

This patch add supports for variable sized arrays whose size is
another field of the state.

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

6f67c50f 08/28/2009 04:30 am Juan Quintela

Add VMState support for static sized buffers (uint_8)

This patch adds support for static sized buffer and typecheks that the buffer is right.

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

0a031e0a 08/28/2009 04:30 am Juan Quintela

Add VMState support for int32_t check value

We read the saved value and check that it is less or equal than the one
stored in the structure.

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

cff09e92 08/28/2009 04:30 am Juan Quintela

Add VMState support to run a function after load

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

b5a22e4a 08/28/2009 04:30 am Juan Quintela

Use return value from load_state() call back

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

4082be4d 08/28/2009 04:30 am Juan Quintela

Add vmstate_load() and vmstate_save() functions

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

9ed7d6ae 08/28/2009 04:30 am Juan Quintela

New VMstate save/load infrastructure

This patch introduces VMState infrastructure, to convert the save/load
functions of devices to a table approach. This new approach has the
following advantages:
- it is type-safe
- you can't have load/save functions out of sync...

dde0463b 08/28/2009 04:30 am Juan Quintela

Add VMState support for pointers

This patch adds support for saving pointers to values

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

f752a6aa 08/28/2009 04:30 am Juan Quintela

Add VMState support for arrays

This patch adds support for saving arrays inside the struct

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

ec245e21 08/28/2009 04:30 am Juan Quintela

Add VMState support for structs

This patch adds support for saving one VMStateDescription from other
VMStateDescription.

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

82501660 08/28/2009 04:30 am Juan Quintela

Add VMState support for int32_t check value

We read the saved value and check that it is the same that the one
is stored in the structure.

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

7b630349 08/28/2009 04:30 am Juan Quintela

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 <>...

c8d41b2c 08/28/2009 04:30 am Juan Quintela

move do_loadvm() to monitor.c

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

05f2401e 08/28/2009 04:30 am Juan Quintela

make load_vmstate() return errors

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

5ac1fad3 08/28/2009 03:33 am Paolo Bonzini

add file descriptor migration

Signed-off-by: Paolo Bonzini <>
Cc: Chris Lalancette <>
Signed-off-by: Anthony Liguori <>

7f79dd28 08/24/2009 04:02 pm Paolo Bonzini

unify popen/fopen qemu wrappers

While reading Chris's code for fd migration I noticed the duplication
between QEMUFilePopen and QEMUFileStdio. This fixes it, and makes
qemu_fopen more similar qemu_popen.

Signed-off-by: Paolo Bonzini <>...

71e72a19 07/27/2009 10:09 pm Juan Quintela

rename HOST_BSD to CONFIG_BSD

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

751c6a17 07/27/2009 10:08 pm Gerd Hoffmann

kill drives_table

First step cleaning up the drives handling. This one does nothing but
removing drives_table[], still it became seriously big.

drive_get_index() is gone and is replaced by drives_get() which hands
out DriveInfo pointers instead of a table index. This needs adaption in...

0bb05eaf 07/17/2009 01:28 am Glauber Costa

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 of
migration data, but has no associated file anymore. It is, thus,
possible to crash qemu by calling migrate_set_speed after a migration...

45566e9c 07/16/2009 04:28 pm Christoph Hellwig

replace bdrv_{get, put}_buffer with bdrv_{load, save}_vmstate

The VM state offset is a concept internal to the image format. Replace
the old bdrv_{get,put}_buffer method that require an index into the
image file that is constructed from the VM state offset and an offset...

8a67ec4d 06/14/2009 03:19 am Uri Lublin

exec-migration: handle EINTR in popen_get_buffer()

Sometimes, upon interrupt, fread returns with no data, and
the (incoming exec) migration fails.

Fix by retrying on such a case.

Signed-off-by: Uri Lublin <>
Signed-off-by: Anthony Liguori <>

c5b76b38 06/13/2009 11:44 am Blue Swirl

Fix mingw32 build warnings

Work around buffer and ioctlsocket argument type signedness problems
Suppress a prototype which is unused on mingw32
Expand a macro to avoid warnings from some GCC versions

Signed-off-by: Blue Swirl <>

cda9046b 06/09/2009 01:38 pm Mark McLoughlin

net: re-name vc->fd_read() to vc->receive()

VLANClientState's fd_read() handler doesn't read from file
descriptors, 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 <>

e3f5ec2b 06/09/2009 01:38 pm Mark McLoughlin

net: pass VLANClientState* as first arg to receive handlers

Give static type checking a chance to catch errors.

Signed-off-by: Mark McLoughlin <>

8a43b1ea 05/27/2009 05:46 pm Chris Lalancette

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 suffers
the same problem that -incoming tcp used to suffer; namely, that you can't...

19629537 05/22/2009 06:50 pm Glauber Costa

introduce set_rate_limit function for QEMUFile

This patch converts the current callers of qemu_fopen_ops().

Signed-off-by: Glauber Costa <>
Signed-off-by: Anthony Liguori <>

976305b7 05/22/2009 06:50 pm Gleb Natapov

Minimal ethernet frame length is 64 bytes.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Anthony Liguori <>

ed8b330b 05/22/2009 06:50 pm Gleb Natapov

Don't send all gratuitous packets at once.

Use timer to separate them in time.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Anthony Liguori <>

d02f7094 05/01/2009 06:03 pm Anthony Liguori

Make sure not to fall through on error in loadvm

This is from the KVM tree

Signed-off-by: Anthony Liguori <>

41bd13af 04/17/2009 08:10 pm aliguori

Add unregister_savevm() (Mark McLoughlin)

Currently there's no way to unregister a savevm callback, so
e.g. if a NIC is hot-unplugged and a savevm is issued, we'll
segfault.

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>...

4dabe248 04/05/2009 10:30 pm aliguori

create qemu_file_set_error (Glauber Costa)

This is mainly for consistency, since we don't want
anything outside of savevm setting it explicitly. There
are current no users of that in qemu tree, but there
are potential candidates on kvm-userspace. And avi...

178e08a5 04/05/2009 10:10 pm aliguori

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 do
savevm/loadvm. Temporarily allow them to be growable by introducing a new...

3450df30 03/13/2009 05:03 pm aliguori

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 <>
Signed-off-by: Anthony Liguori <>...

49dc768d 03/08/2009 06:26 pm aliguori

Fix windows build and clean up use of <windows.h>

We want to globally define WIN_LEAN_AND_MEAN and WINVER to particular values so
let'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 <>...

179a2c19 03/08/2009 10:23 am blueswir1

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

c5e97233 03/07/2009 10:06 pm blueswir1

Support for DragonFly BSD (Hasso Tepper)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6746 c046a42c-6fe2-441c-8c8c-71466251a162

d40cdb10 03/07/2009 06:52 pm blueswir1

Fix BSD breakage from r6736

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6742 c046a42c-6fe2-441c-8c8c-71466251a162

511d2b14 03/07/2009 05:32 pm blueswir1

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

376253ec 03/06/2009 01:01 am aliguori

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 services
gain a new parameter (mon) that will once refer to the monitor instance
the output is supposed to appear on. However, the argument remains...

1eec614b 02/06/2009 12:06 am aliguori

toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6531 c046a42c-6fe2-441c-8c8c-71466251a162

2d22b18f 12/11/2008 11:06 pm aliguori

Fix handling of disk-only snapshots (Kevin Wolf)

When creating a snapshot with multiple qcow2 disks attached, the current
behaviour is that qemu creates a disk snapshot on all of them and
chooses one to write the VM state to.

Despite having the state only in one image, loadvm tries to restore the...

a672b469 11/11/2008 11:33 pm aliguori

Split savevm code into savevm.c

This is pure code motion. The savevm code is all common code so we can build
it once and share the object with all executables.

Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5700 c046a42c-6fe2-441c-8c8c-71466251a162