Statistics
| Branch: | Revision:

root / migration.c @ feature-archipelago

History | View | Annotate | Download (19.7 kB)

# Date Author Comment
41310c68 02/25/2014 03:30 pm Michael R. Hines

rdma: rename 'x-rdma' => 'rdma'

As far as we can tell, all known bugs have been fixed:

1. Parallel migrations are working
2. IPv6 migration is working
3. virt-test is working

I'm not comfortable sending the revised libvirt patch
until this is accepted or review suggestions are addressed,...

a5615b14 02/04/2014 05:49 pm Orit Wasserman

XBZRLE cache size should not be larger than guest memory size

Signed-off-by: Orit Wasserman <>
Reviewed-by: Dr. David Alan Gilbert <>
Signed-off-by: Juan Quintela <>

c91e681a 02/04/2014 05:49 pm Orit Wasserman

Add check for cache size smaller than page size

Signed-off-by: Orit Wasserman <>
Reviewed-by: Juan Quintela <>
Signed-off-by: Juan Quintela <>

905f26f2 02/04/2014 05:49 pm Gonglei (Arei)

migration:fix free XBZRLE decoded_buf wrong

When qemu do live migration with xbzrle, qemu malloc decoded_buf
at destination end but free it at source end. It will crash qemu
by double free error in some scenarios. Splitting the XBZRLE structure
for clear logic distinguishing src/dst side....

133fe774 01/14/2014 04:10 am Edgar E. Iglesias

Merge remote branch 'luiz/queue/qmp' into qmpq

  • luiz/queue/qmp:
    migration: qmp_migrate(): keep working after syntax error
    qerror: Remove assert_no_error()
    qemu-option: Remove qemu_opts_create_nofail
    target-i386: Remove assert_no_error usage
    hw: Remove assert_no_error usages...
6f2b811a 01/13/2014 01:39 pm Zhanghaoyu (A)

avoid a bogus COMPLETED->CANCELLED transition

Avoid a bogus COMPLETED->CANCELLED transition.
There is a period of time from the timing of setting COMPLETED state to that of migration thread exits, so during which it's problematic in COMPLETED->CANCELLED transition....

51cf4c1a 01/13/2014 01:39 pm Zhanghaoyu (A)

introduce MIG_STATE_CANCELLING state

Introduce MIG_STATE_CANCELLING state to avoid starting a new migration task while the previous one still exist.

Signed-off-by: Zeng Junliang <>
Signed-off-by: Zhang Haoyu <>...

40596834 01/13/2014 01:39 pm Matthew Garrett

migration: Fix rate limit

The migration thread appears to want to allow writeout to occur at full
speed rather than being rate limited during completion of state saving,
but sets the limit to INT_MAX when xfer_limit is INT64_MAX. This causes
problems if there's more than 2GB of state left to save at this point. It...

c9501142 01/06/2014 10:02 pm Luiz Capitulino

migration: qmp_migrate(): keep working after syntax error

If a user or QMP client enter a bad syntax for the migrate
command in QMP/HMP, then the migrate command will never succeed
from that point on.

For example, if you enter:

(qemu) migrate tcp;0:4444...

387eedeb 10/05/2013 01:02 pm Michael Tokarev

migration: Fix compiler warning ('caps' may be used uninitialized)

Signed-off-by: Michael Tokarev <>
Reviewed-by: Stefan Weil <>

5016e2df 09/24/2013 02:22 pm Christoffer Dall

migration: Fix debug print type

The printf args are uint64_t and with -Werr QEMU doesn't compile with
migration debugging turned on unless this is fixed. Fix it.

Signed-off-by: Christoffer Dall <>
Signed-off-by: Juan Quintela <>

bc72ad67 08/22/2013 08:14 pm Alex Bligh

aio / timers: Switch entire codebase to the new timer API

This is an autogenerated patch using scripts/switch-timer-api.

Switch the entire code base to using the new timer API.

Note this patch may introduce some line length issues.

Signed-off-by: Alex Bligh <>...

6a1751b7 08/22/2013 08:10 pm Alex Bligh

aio / timers: Untangle include files

include/qemu/timer.h has no need to include main-loop.h and
doing so causes an issue for the next patch. Unfortunately
various files assume including timers.h will pull in main-loop.h.
Untangle this mess.

Signed-off-by: Alex Bligh <>...

00c14997 08/01/2013 04:40 pm Pawit Pornkitprasan

migration: send total time in QMP at "completed" stage

The "completed" stage sets total_time but not has_total_time and
thus it is not sent via QMP reply (but sent via HMP nevertheless)

Signed-off-by: Pawit Pornkitprasan <>
Reviewed-by: Eric Blake <>...

8c0426ae 08/01/2013 04:40 pm Pawit Pornkitprasan

migration: don't use uninitialized variables

The qmp_migrate method uses the 'blk' and 'inc' parameter without
checking if they're valid or not (they may be uninitialized if
command is received via QMP)

Signed-off-by: Pawit Pornkitprasan <>...

02edd2e7 07/29/2013 06:19 pm Stefan Hajnoczi

migration: fix spice migration

Commit 29ae8a4133082e16970c9d4be09f4b6a15034617 ("rdma: introduce
MIG_STATE_NONE and change MIG_STATE_SETUP state transition") changed the
state transitions during migration setup.

Spice used to be notified with MIG_STATE_ACTIVE and it detected this...

9287ac27 07/29/2013 06:18 pm Stefan Hajnoczi

migration: notify migration state before starting thread

The migration thread runs outside the QEMU global mutex when possible.
Therefore we must notify migration state change before starting the
migration thread.

This allows registered listeners to act before live migration iterations...

29ae8a41 07/23/2013 02:06 pm Michael R. Hines

rdma: introduce MIG_STATE_NONE and change MIG_STATE_SETUP state transition

As described in the previous patch, until now, the MIG_STATE_SETUP
state was not really a 'formal' state. It has been used as a 'zero' state
(what we're calling 'NONE' here) and QEMU has been unconditionally transitioning...

ed4fbd10 07/23/2013 02:06 pm Michael R. Hines

rdma: account for the time spent in MIG_STATE_SETUP through QMP

Using the previous patches, we're now able to timestamp the SETUP
state. Once we have this time, let the user know about it in the
schema.

Reviewed-by: Juan Quintela <>
Reviewed-by: Eric Blake <>...

d58f574b 07/23/2013 02:06 pm Michael R. Hines

rdma: allow state transitions between other states besides ACTIVE

This patch is in preparation for the next ones: Until now the MIG_STATE_SETUP
state was not really a 'formal' state. It has been used as a 'zero' state
and QEMU has been unconditionally transitioning into this state when...

2da776db 07/23/2013 12:12 pm Michael R. Hines

rdma: core logic

Code that does need to be visible is kept
well contained inside this file and this is the only
new additional file to the entire patch.

This file includes the entire protocol and interfaces
required to perform RDMA migration.

Also, the configure and Makefile modifications to link...

323004a3 07/19/2013 07:29 am Peter Lieven

block-migration: efficiently encode zero blocks

this patch adds a efficient encoding for zero blocks by
adding a new flag indicating a block is completely zero.

additionally bdrv_write_zeros() is used at the destination
to efficiently write these zeroes. depending on the implementation...

6453a3a6 07/15/2013 10:49 pm Anthony Liguori

Merge remote-tracking branch 'quintela/migration.next' into staging

  1. By Chegu Vinod
  2. Via Juan Quintela
    • quintela/migration.next:
      Force auto-convegence of live migration
      Add 'auto-converge' migration capability
      Introduce async_run_on_cpu()

Message-id: ...

0e1146a7 07/15/2013 10:51 am Kevin Wolf

migration: Fail migration on bdrv_flush_all() error

If bdrv_flush_all() returns an error, there is an inconsistency in the
view of an image file between the source and the destination host.
Completing the migration would lead to corruption. Better abort
migration in this case....

bde1e2ec 07/12/2013 09:34 pm Chegu Vinod

Add 'auto-converge' migration capability

The auto-converge migration capability allows the user to specify if they
choose live migration seqeunce to automatically detect and force convergence.

Signed-off-by: Chegu Vinod <>
Reviewed-by: Paolo Bonzini <>...

5444e768 07/04/2013 06:42 pm Paolo Bonzini

add a header file for atomic operations

We're already using them in several places, but __sync builtins are just
too ugly to type, and do not provide seqcst load/store operations.

Reviewed-by: Richard Henderson <>
Signed-off-by: Paolo Bonzini <>

7e114f8c 06/27/2013 03:38 am Michael R. Hines

rdma: export throughput w/ MigrationStats QMP

This exposes throughput (in megabits/sec) through QMP.

Reviewed-by: Juan Quintela <>
Reviewed-by: Paolo Bonzini <>
Reviewed-by: Chegu Vinod <>
Tested-by: Chegu Vinod <>...

60d9222c 06/27/2013 03:38 am Michael R. Hines

rdma: introduce capability x-rdma-pin-all

This capability allows you to disable dynamic chunk registration
for better throughput on high-performance links.

For example, using an 8GB RAM virtual machine with all 8GB of memory in
active use and the VM itself is completely idle using a 40 gbps infiniband link:...

12cd30e9 06/01/2013 01:25 pm Lei Li

migration: Remove duplicate bandwidth_limit set

bandwidth_limit is double set in migrate_init(), remove one.

Signed-off-by: Lei Li <>
Signed-off-by: Michael Tokarev <>

77417f10 05/17/2013 05:58 pm Michael Roth

Revert "migration: don't account sleep time for calculating bandwidth"

This reverts commit 7161082c8d8cf167c508976887a0a63f4db92b51.

Reverting this patch fixes a divide-by-zero error in qemu that can be
fairly reliably triggered by doing block migration. In this case, the...

4aead692 04/17/2013 06:24 pm Eric Blake

migration: reflect incoming failure to shell

Management apps like libvirt don't know to pay attention to
stderr unless there is a non-zero exit status.

  • migration.c (process_incoming_migration_co): Exit with non-zero
    status on failure.

Signed-off-by: Eric Blake <>...

f9e8cacc 04/02/2013 06:47 pm Stefan Hajnoczi

oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()

The fcntl(fd, F_SETFL, O_NONBLOCK) flag is not specific to sockets.
Rename to qemu_set_nonblock() just like qemu_set_cloexec().

Signed-off-by: Stefan Hajnoczi <>
Reviewed-by: Eric Blake <>...

f1c72795 03/26/2013 02:32 pm Peter Lieven

migration: do not sent zero pages in bulk stage

during bulk stage of ram migration if a page is a
zero page do not send it at all.
the memory at the destination reads as zero anyway.

even if there is an madvise with QEMU_MADV_DONTNEED
at the target upon receipt of a zero page I have observed...

404a7c05 03/11/2013 02:32 pm Paolo Bonzini

migration: move contents of migration_close to migrate_fd_cleanup

With this patch, the migration_file is not needed anymore.

Reviewed-by: Orit Wasserman <>
Reviewed-by: Juan Quintela <>
Signed-off-by: Paolo Bonzini <>...

b352365f 03/11/2013 02:32 pm Paolo Bonzini

migration: eliminate s->migration_file

The indirection is useless now. Backends can open s->file directly.

Reviewed-by: Orit Wasserman <>
Reviewed-by: Juan Quintela <>
Signed-off-by: Paolo Bonzini <>...

6f190a06 03/11/2013 02:32 pm Paolo Bonzini

migration: inline migrate_fd_close

Reviewed-by: Orit Wasserman <>
Reviewed-by: Juan Quintela <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Juan Quintela <>

edaae611 03/11/2013 02:32 pm Paolo Bonzini

migration: yay, buffering is gone

Buffering was needed because blocking writes could take a long time
and starve other threads seeking to grab the big QEMU mutex.

Now that all writes (except within _complete callbacks) are done
outside the big QEMU mutex, we do not need buffering at all....

5f496a1b 03/11/2013 02:32 pm Juan Quintela

Rename buffered_ to migration_

This is consistent once that we have moved everything to migration.c

Reviewed-by: Orit Wasserman <>
Reviewed-by: Juan Quintela <>
Signed-off-by: Juan Quintela <>

059f896c 03/11/2013 02:32 pm Paolo Bonzini

migration: eliminate last_round

We will go around the loop exactly once after setting last_round.
Eliminate the variable altogether.

Reviewed-by: Orit Wasserman <>
Reviewed-by: Juan Quintela <>
Signed-off-by: Paolo Bonzini <>...

fd45ee2c 03/11/2013 02:32 pm Paolo Bonzini

migration: detect error before sleeping

Reviewed-by: Orit Wasserman <>
Reviewed-by: Juan Quintela <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Juan Quintela <>

db2f2530 03/11/2013 02:32 pm Paolo Bonzini

migration: remove useless qemu_file_get_error check

migration_put_buffer is never called if there has been an error.

Reviewed-by: Orit Wasserman <>
Reviewed-by: Juan Quintela <>
Signed-off-by: Paolo Bonzini <>...

a0ff044b 03/11/2013 02:32 pm Paolo Bonzini

migration: use qemu_file_rate_limit consistently

Reviewed-by: Orit Wasserman <>
Reviewed-by: Juan Quintela <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Juan Quintela <>

f8bbc128 03/11/2013 02:32 pm Paolo Bonzini

migration: use QEMUFile for migration channel lifetime

As a start, use QEMUFile to store the destination and close it.
qemu_get_fd gets a file descriptor that will be used by the write
callbacks.

Reviewed-by: Orit Wasserman <>
Reviewed-by: Juan Quintela <>...

e6a1cf21 03/11/2013 02:32 pm Paolo Bonzini

migration: use QEMUFile for writing outgoing migration data

Second, drop the file descriptor indirection, and write directly to the
QEMUFile.

Reviewed-by: Orit Wasserman <>
Reviewed-by: Juan Quintela <>
Signed-off-by: Paolo Bonzini <>...

be7172e2 03/11/2013 02:32 pm Paolo Bonzini

migration: use qemu_ftell to compute bandwidth

Prepare for when s->bytes_xfer will be removed.

Reviewed-by: Orit Wasserman <>
Reviewed-by: Juan Quintela <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Juan Quintela <>

442773ce 03/11/2013 02:32 pm Paolo Bonzini

migration: small changes around rate-limiting

This patch extracts a few small changes from the next patch, which
are unrelated to adding generic rate-limiting functionality to
QEMUFile. Make migration_set_rate_limit a simple accessor, and
use qemu_file_set_rate_limit consistently. Also fix a typo where...

1964a397 03/11/2013 02:32 pm Paolo Bonzini

migration: move rate limiting to QEMUFile

Rate limiting is now simply a byte counter; client call
qemu_file_rate_limit() manually to determine if they have to exit.
So it is possible and simple to move the functionality to QEMUFile.

This makes the remaining functionality of s->file redundant;...

f5821518 03/11/2013 02:32 pm Paolo Bonzini

migration: flush all data to fd when buffered_flush is called

Including data that resided in the QEMUFile's own buffer.

Reviewed-by: Orit Wasserman <>
Reviewed-by: Juan Quintela <>
Signed-off-by: Paolo Bonzini <>...

63dfbd7e 03/11/2013 02:32 pm Paolo Bonzini

migration: use qemu_file_set_error

Remove the return value of buffered_flush, pass it via the error code
of s->file. Once this is done, the error can be retrieved simply
via migrate_fd_close's call to qemu_fclose.

Reviewed-by: Orit Wasserman <>...

dba433c0 03/11/2013 02:32 pm Paolo Bonzini

migration: simplify error handling

Always use qemu_file_get_error to detect errors, since that is how
QEMUFile itself drops I/O after an error occurs. There is no need
to propagate and check return values all the time.

Also remove the "complete" member, since we know that it is set (via...

a3fa1d78 03/11/2013 02:32 pm Paolo Bonzini

migration: do not nest flushing of device data

Completion of migration is currently done with a "nested" loop that
invokes buffered_flush: migrate_fd_completed is called by
buffered_file_thread, which calls migrate_fd_cleanup, which calls
buffered_close (via qemu_fclose), which flushes the buffer....

c09e5bb1 03/11/2013 02:32 pm Kazuya Saito

migration: add migrate_set_state tracepoint

Signed-off-by: Kazuya Saito <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Juan Quintela <>

f4410a5d 03/11/2013 02:32 pm Paolo Bonzini

migration: prepare to access s->state outside critical sections

Accessing s->state outside the big QEMU lock will simplify a bit the
locking/unlocking of the iothread lock.

We need to keep the lock in migrate_fd_error and migrate_fd_completed,
however, because they call migrate_fd_cleanup....

bb1fadc4 03/11/2013 02:32 pm Paolo Bonzini

migration: cleanup migration (including thread) in the iothread

Perform final cleanup in a bottom half, and add joining the thread to
the series of cleanup actions.

migrate_fd_error remains for connection error, but it doesn't need
to cleanup anything anymore....

32c835ba 03/11/2013 02:32 pm Paolo Bonzini

migration: run pending/iterate callbacks out of big lock

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

9b095037 03/11/2013 02:32 pm Paolo Bonzini

migration: run setup callbacks out of big lock

Only the migration_bitmap_sync() call needs the iothread lock.

Reviewed-by: Orit Wasserman <>
Reviewed-by: Juan Quintela <>
Signed-off-by: Paolo Bonzini <>...

5da5aad0 03/11/2013 02:32 pm Paolo Bonzini

migration: simplify while loop

Unify the goto around the loop, with the exit condition at the end of it.
Both can be expressed as "while (ret >= 0)".

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Juan Quintela <>

891518ab 03/11/2013 02:32 pm Paolo Bonzini

migration: always use vm_stop_force_state

vm_stop_force_state does:

if (runstate_is_running()) {
vm_stop(state);
} else {
runstate_set(state);
}

migration.c does:

if (runstate_is_running()) {
vm_stop(state);
} else {...
7a2c1721 03/11/2013 02:32 pm Paolo Bonzini

migration: move more error handling to migrate_fd_cleanup

The next patch will add more cases where qemu_savevm_state_cancel
needs to be called; prepare for that already, the function can be
called twice with no ill effect.

Reviewed-by: Orit Wasserman <>...

cc283e3b 02/22/2013 11:12 am Juan Quintela

migration: change initial value of expected_downtime

0 is a very bad initial value, what we are trying to get is
max_downtime, so that is a much better estimation.

Signed-off-by: Juan Quintela <>

Reviewed-by: Orit Wasserman <>

a3e879cd 02/22/2013 11:12 am Juan Quintela

migration: calculate end time after we have sent the data

Signed-off-by: Juan Quintela <>

Reviewed-by: Orit Wasserman <>

7161082c 02/22/2013 11:12 am Juan Quintela

migration: don't account sleep time for calculating bandwidth

While we are sleeping we are not sending, so we should not use that
time to estimate our bandwidth.

Signed-off-by: Juan Quintela <>

Reviewed-by: Orit Wasserman <>

90f8ae72 02/22/2013 11:12 am Juan Quintela

migration: calculate expected_downtime

We removed the calculation in commit e4ed1541ac9413eac494a03532e34beaf8a7d1c5

Now we add it back. We need to create dirty_bytes_rate because we
can't include cpu-all.h from migration.c, and there is no other way to...

d7cd3694 02/11/2013 09:22 pm Stefan Hajnoczi

migration: restrict scope of incoming fd read handler

The incoming migration is processed in a coroutine and uses an fd read
handler to enter the yielded coroutine when data becomes available.

The read handler was set too broadly, so that spurious coroutine entries...

312fd5f2 02/11/2013 04:13 pm Markus Armbruster

error: Strip trailing '\n' from error string arguments (again)

Commit 6daf194d and be62a2eb got rid of a bunch, but they keep coming
back. Tracked down with this Coccinelle semantic patch:

r
expression err, eno, cls, fmt;
position p;
@@
(...
f7b67be3 01/17/2013 02:54 pm Juan Quintela

migration: Add buffered_flush error handling

Now that we have error handling we can do proper handling of
buffered_flush().

Signed-off-by: Juan Quintela <>

Reviewed-by: Reviewed-by: Eric Blake <>
Reviewed-by: Paolo Bonzini <>

7de6a690 01/17/2013 02:54 pm Juan Quintela

migration: move exit condition to migration thread

Signed-off-by: Juan Quintela <>

Reviewed-by: Reviewed-by: Eric Blake <>
Reviewed-by: Paolo Bonzini <>

c369f40d 01/17/2013 02:54 pm Juan Quintela

migration: unfold rest of migrate_fd_put_ready() into thread

This will allow us finer control in next patches.

Signed-off-by: Juan Quintela <>

Reviewed-by: Reviewed-by: Eric Blake <>
Reviewed-by: Paolo Bonzini <>

b22ff1fb 01/17/2013 02:54 pm Juan Quintela

migration: Only go to the iterate stage if there is anything to send

Signed-off-by: Orit Wasserman <>
Signed-off-by: Juan Quintela <>

Reviewed-by: Reviewed-by: Eric Blake <>
Reviewed-by: Paolo Bonzini <>

6522773f 01/17/2013 02:54 pm Juan Quintela

migration: remove argument to qemu_savevm_state_cancel

Signed-off-by: Juan Quintela <>

Reviewed-by: Reviewed-by: Eric Blake <>
Reviewed-by: Paolo Bonzini <>

76f5933a 01/17/2013 02:54 pm Juan Quintela

migration: move beginning stage to the migration thread

Signed-off-by: Juan Quintela <>

Reviewed-by: Reviewed-by: Eric Blake <>
Reviewed-by: Paolo Bonzini <>

b9c961a8 01/17/2013 02:54 pm Paolo Bonzini

migration: make function static

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Juan Quintela <>

Reviewed-by: Reviewed-by: Eric Blake <>

25242635 01/17/2013 02:54 pm Paolo Bonzini

migration: remove double call to migrate_fd_close

The call in buffered_close is enough, because buffered_close is called
already by migrate_fd_cleanup.

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

1e973051 01/17/2013 02:54 pm Paolo Bonzini

migration: fix off-by-one in buffered_rate_limit

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Juan Quintela <>

Reviewed-by: Reviewed-by: Eric Blake <>

f65a8747 01/17/2013 02:53 pm Paolo Bonzini

use XFER_LIMIT_RATIO consistently

commit 5b4e1eb769eee892b44d3f6b2369b05196442f59

missed this use.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Juan Quintela <>

Reviewed-by: Reviewed-by: Eric Blake <>

e659586e 12/21/2012 12:09 am Paolo Bonzini

migration: fix qemu_get_fd for BufferedFile

Not really used, but nice to have it correct. :)

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Juan Quintela <>

9848a404 12/21/2012 12:09 am Juan Quintela

migration: merge QEMUFileBuffered into MigrationState

Avoid splitting the state of outgoing migration, more or less arbitrarily,
between two data structures. QEMUFileBuffered anyway is used only during
migration.

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

5b4e1eb7 12/21/2012 12:09 am Juan Quintela

migration: add XFER_LIMIT_RATIO

The "magic" divisions by 10 are there because of the value of BUFFER_DELAY.
Introduce a constant to explain them better.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Juan Quintela <>

0e288fa3 12/21/2012 12:09 am Juan Quintela

migration: move migration_fd_put_ready()

Put it near its use and un-export it.

Signed-off-by: Juan Quintela <>

2e450865 12/21/2012 12:09 am Juan Quintela

migration: Inline qemu_fopen_ops_buffered into migrate_fd_connect

Signed-off-by: Juan Quintela <>

0d3b26f5 12/21/2012 12:09 am Juan Quintela

migration: move migration notifier

At this point, it is waranteed that state is ACTIVE. Old position
didn't assured hat.

Signed-off-by: Juan Quintela <>

0d82d0e8 12/21/2012 12:09 am Juan Quintela

migration: move buffered_file.c code into migration.c

This only moves the code (also from buffered_file.h to migration.h).
Fix whitespace until checkpatch is happy.

Signed-off-by: Juan Quintela <>

edfa1af5 12/21/2012 12:09 am Juan Quintela

migration: make qemu_fopen_ops_buffered() return void

We want the file assignment to happen before the thread is created to
avoid locking, so we just do it before creating the thread.

Signed-off-by: Juan Quintela <>

Reviewed-by: Orit Wasserman <>

766bd176 12/21/2012 12:09 am Juan Quintela

migration: move migration thread init code to migrate_fd_put_ready

This way everything related with migration is run on the migration
thread and no locking is needed.

Signed-off-by: Juan Quintela <>

dd217b87 12/21/2012 12:09 am Juan Quintela

migration: make writes blocking

Move all the writes to the migration_thread, and make writings
blocking. Notice that are still using the iothread for everything
that we do.

Signed-off-by: Juan Quintela <>

188a4285 12/21/2012 12:09 am Juan Quintela

migration: remove unfreeze logic

Now that we have a thread, and blocking writes, we don't need it.

Signed-off-by: Juan Quintela <>

Reviewed-by: Paolo Bonzini <>

e7627482 12/21/2012 12:09 am Juan Quintela

migration: just lock migrate_fd_put_ready

Signed-off-by: Juan Quintela <>

e4ed1541 12/21/2012 12:09 am Juan Quintela

savevm: New save live migration method: pending

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

24ea1e4b 12/20/2012 11:44 pm Paolo Bonzini

migration: remove double call to migrate_fd_close

The call in buffered_close is enough, because buffered_close is called
already by migrate_fd_cleanup.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Juan Quintela <>

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

83c9089e 12/19/2012 09:31 am Paolo Bonzini

monitor: move include files to include/monitor/

Signed-off-by: Paolo Bonzini <>

caf71f86 12/19/2012 09:31 am Paolo Bonzini

migration: move include files to include/migration/

Signed-off-by: Paolo Bonzini <>

737e150e 12/19/2012 09:31 am Paolo Bonzini

block: move include files to include/block/

Signed-off-by: Paolo Bonzini <>

82a4da79 11/02/2012 07:35 pm Paolo Bonzini

migration: move process_incoming_migration to a coroutine

The final part of incoming migration, which now consists of
process_incoming_migration for all protocols, is thus made non-blocking.

Reviewed-by: Orit Wasserman <>
Signed-off-by: Paolo Bonzini <>

8dc592e6 11/02/2012 07:35 pm Paolo Bonzini

migration: use migrate_fd_close in migrate_fd_cleanup

migrate_fd_cleanup will usually close the file descriptor via
buffered_file_close's call to migrate_fd_close. However, in the case
of s->file == NULL it is "inlining" migrate_fd_close (almost: there is a...

1c12e1f5 11/02/2012 07:35 pm Paolo Bonzini

migration: move qemu_fclose to process_incoming_migration

The common suffix is now just process_incoming_migration.

Reviewed-by: Orit Wasserman <>
Signed-off-by: Paolo Bonzini <>

3f4331bf 10/29/2012 03:55 pm Aurelien Jarno

Merge branch 'queue/qmp' of git://repo.or.cz/qemu/qmp-unstable

  • 'queue/qmp' of git://repo.or.cz/qemu/qmp-unstable:
    migration: go to paused state after finishing incoming migration with -S
    qmp: handle stop/cont in INMIGRATE state
    hmp: fix info cpus for sparc targets
29ed72f1 10/24/2012 04:27 pm Paolo Bonzini

migration: go to paused state after finishing incoming migration with -S

At the end of migration the machine has started already, and cannot be
destroyed without losing the guest's data. Hence, prelaunch is the
wrong state. Go to the paused state instead. QEMU would reach that...

43eaae28 10/23/2012 02:54 pm Paolo Bonzini

migration (incoming): add error propagation to fd and exec protocols

And remove the superfluous integer return value.

Reviewed-by: Luiz Capitulino <>
Signed-off-by: Paolo Bonzini <>