4886a1bc | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
migrate_start_postcopy: Command to trigger transition to postcopy
Once postcopy is enabled (with migrate_set_capability), the migration will still start on precopy mode. To cause a transition into
migrate_start_postcopy: Command to trigger transition to postcopy
Once postcopy is enabled (with migrate_set_capability), the migration will still start on precopy mode. To cause a transition into postcopy the:
migrate_start_postcopy
command must be issued. Postcopy will start sometime after this (when it's next checked in the migration loop).
Issuing the command before migration has started will error, and issuing after it has finished is ignored.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
eb59db53 | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
postcopy: OS support test
Provide a check to see if the OS we're running on has all the bits needed for postcopy.
Creates postcopy-ram.c which will get most of the other helpers we need.
Signed-of
postcopy: OS support test
Provide a check to see if the OS we're running on has all the bits needed for postcopy.
Creates postcopy-ram.c which will get most of the other helpers we need.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
c31b098f | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
Modify save_live_pending for postcopy
Modify save_live_pending to return separate postcopiable and non-postcopiable counts.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Modify save_live_pending for postcopy
Modify save_live_pending to return separate postcopiable and non-postcopiable counts.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
11cf1d98 | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
MIG_CMD_PACKAGED: Send a packaged chunk of migration stream
MIG_CMD_PACKAGED is a migration command that wraps a chunk of migration stream inside a package whose length can be determined purely by r
MIG_CMD_PACKAGED: Send a packaged chunk of migration stream
MIG_CMD_PACKAGED is a migration command that wraps a chunk of migration stream inside a package whose length can be determined purely by reading its header. The destination guarantees that the whole MIG_CMD_PACKAGED is read off the stream prior to parsing the contents.
This is used by postcopy to load device state (from the package) while leaving the main stream free to receive memory pages.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
093e3c42 | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
Add wrappers and handlers for sending/receiving the postcopy-ram migration messages.
The state of the postcopy process is managed via a series of messages; * Add wrappers and handlers for sending
Add wrappers and handlers for sending/receiving the postcopy-ram migration messages.
The state of the postcopy process is managed via a series of messages; * Add wrappers and handlers for sending/receiving these messages * Add state variable that track the current state of postcopy
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
53dd370c | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
Add migration-capability boolean for postcopy-ram.
The 'postcopy ram' capability allows postcopy migration of RAM; note that the migration starts off in precopy mode until postcopy mode is triggered
Add migration-capability boolean for postcopy-ram.
The 'postcopy ram' capability allows postcopy migration of RAM; note that the migration starts off in precopy mode until postcopy mode is triggered (see the migrate_start_postcopy patch later in the series).
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
7b89bf27 | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
Rework loadvm path for subloops
Postcopy needs to have two migration streams loading concurrently; one from memory (with the device state) and the other from the fd with the memory transactions.
Sp
Rework loadvm path for subloops
Postcopy needs to have two migration streams loading concurrently; one from memory (with the device state) and the other from the fd with the memory transactions.
Split the core of qemu_loadvm_state out so we can use it for both.
Allow the inner loadvm loop to quit and cause the parent loops to exit as well.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
70b20477 | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
Return path: Source handling of return path
Open a return path, and handle messages that are received upon it.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela
Return path: Source handling of return path
Open a return path, and handle messages that are received upon it.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
f6844b99 | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
migration_is_setup_or_active
Add 'migration_is_setup_or_active' utility function to check state. (It gets postcopy added to it's list later on in the series)
Signed-off-by: Dr. David Alan Gilbert <
migration_is_setup_or_active
Add 'migration_is_setup_or_active' utility function to check state. (It gets postcopy added to it's list later on in the series)
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
6decec93 | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
Return path: Send responses from destination to source
Add migrate_send_rp_message to send a message from destination to source along the return path. (It uses a mutex to let it be called from mul
Return path: Send responses from destination to source
Add migrate_send_rp_message to send a message from destination to source along the return path. (It uses a mutex to let it be called from multiple threads) Add migrate_send_rp_shut to send a 'shut' message to indicate the destination is finished with the RP. Add migrate_send_rp_ack to send a 'PONG' message in response to a PING Use it in the MSG_RP_PING handler
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
2e37701e | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
Return path: Control commands
Add two src->dest commands: * OPEN_RETURN_PATH - To request that the destination open the return path * PING - Request an acknowledge from the destination
Signed
Return path: Control commands
Add two src->dest commands: * OPEN_RETURN_PATH - To request that the destination open the return path * PING - Request an acknowledge from the destination
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
c76ca188 | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
Migration commands
Create QEMU_VM_COMMAND section type for sending commands from source to destination. These commands are not intended to convey guest state but to control the migration process.
Migration commands
Create QEMU_VM_COMMAND section type for sending commands from source to destination. These commands are not intended to convey guest state but to control the migration process.
For use in postcopy.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
3e4097b5 | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
Return path: socket_writev_buffer: Block even on non-blocking fd's
The destination sets the fd to non-blocking on incoming migrations; this also affects the return path from the destination, and thu
Return path: socket_writev_buffer: Block even on non-blocking fd's
The destination sets the fd to non-blocking on incoming migrations; this also affects the return path from the destination, and thus we need to make sure we can safely write to the return path.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
adc468e9 | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
Return path: Open a return path on QEMUFile for sockets
Postcopy needs a method to send messages from the destination back to the source, this is the 'return path'.
Wire it up for 'socket' QEMUFile
Return path: Open a return path on QEMUFile for sockets
Postcopy needs a method to send messages from the destination back to the source, this is the 'return path'.
Wire it up for 'socket' QEMUFile's.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
a3e06c3d | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
Rename save_live_complete to save_live_complete_precopy
In postcopy we're going to need to perform the complete phase for postcopiable devices at a different point, start out by renaming all of the
Rename save_live_complete to save_live_complete_precopy
In postcopy we're going to need to perform the complete phase for postcopiable devices at a different point, start out by renaming all of the 'complete's to make the difference obvious.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
aefeb18b | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
migrate_init: Call from savevm
Suspend to file is very much like a migrate, and it makes life easier if we have the Migration state available, so initialise it in the savevm.c code for suspending.
migrate_init: Call from savevm
Suspend to file is very much like a migrate, and it makes life easier if we have the Migration state available, so initialise it in the savevm.c code for suspending.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewd-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
a776aa15 | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
ram_load: Factor out host_from_stream_offset call and check
The main RAM load loop has a call to host_from_stream_offset for each page type that actually loads data with the same test; factor it out
ram_load: Factor out host_from_stream_offset call and check
The main RAM load loop has a call to host_from_stream_offset for each page type that actually loads data with the same test; factor it out before the switch.
The host = NULL is to silence a bogus gcc warning of an unitialised in the RAM_SAVE_COMPRESS_PAGE case, it doesn't seem to realise that host is always initialised by the if at the top in the cases the switch takes.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
4f2e4252 | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
ram_debug_dump_bitmap: Dump a migration bitmap as text
Useful for debugging the migration bitmap and other bitmaps of the same format (including the sentmap in postcopy).
The bitmap is printed to s
ram_debug_dump_bitmap: Dump a migration bitmap as text
Useful for debugging the migration bitmap and other bitmaps of the same format (including the sentmap in postcopy).
The bitmap is printed to stderr. Lines that are all the expected value are excluded so the output can be quite compact for many bitmaps.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
a800cd5c | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
Add wrapper for setting blocking status on a QEMUFile
Add a wrapper to change the blocking status on a QEMUFile rather than having to use qemu_set_block(qemu_get_fd(f)); it seems best to avoid expos
Add wrapper for setting blocking status on a QEMUFile
Add a wrapper to change the blocking status on a QEMUFile rather than having to use qemu_set_block(qemu_get_fd(f)); it seems best to avoid exposing the fd since not all QEMUFile's really have one. With this wrapper we could move the implementation down to be different on different transports.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
9504fb51 | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
Add qemu_get_buffer_in_place to avoid copies some of the time
qemu_get_buffer always copies the data it reads to a users buffer, however in many cases the file buffer inside qemu_file could be given
Add qemu_get_buffer_in_place to avoid copies some of the time
qemu_get_buffer always copies the data it reads to a users buffer, however in many cases the file buffer inside qemu_file could be given back to the caller, avoiding the copy. This isn't always possible depending on the size and alignment of the data.
Thus 'qemu_get_buffer_in_place' either copies the data to a supplied buffer or updates a pointer to the internal buffer if convenient.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
42e2aa56 | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
Rename mis->file to from_src_file
'file' becomes confusing when you have flows in each direction; rename to make it clear. This leaves just the main forward direction ms->file, which is used in a lo
Rename mis->file to from_src_file
'file' becomes confusing when you have flows in each direction; rename to make it clear. This leaves just the main forward direction ms->file, which is used in a lot of places and is probably not worth renaming given the churn.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
e3dd7493 | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
qemu_ram_block_by_name
Add a function to find a RAMBlock by name; use it in two of the places that already open code that loop; we've got another use later in postcopy.
Signed-off-by: Dr. David Ala
qemu_ram_block_by_name
Add a function to find a RAMBlock by name; use it in two of the places that already open code that loop; we've got another use later in postcopy.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
172dfd4f | 05-Nov-2015 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
Move configuration section writing
The vmstate_configuration is currently written in 'qemu_savevm_state_begin', move it to 'qemu_savevm_state_header' since it's got a hard requirement that it must b
Move configuration section writing
The vmstate_configuration is currently written in 'qemu_savevm_state_begin', move it to 'qemu_savevm_state_header' since it's got a hard requirement that it must be the 1st thing after the header. (In postcopy some 'command' sections get sent early before the saving of the main sections and hence before qemu_savevm_state_begin).
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
6ad2a215 | 02-Nov-2015 |
Liang Li <liang.z.li@intel.com> |
migration: code clean up
Just clean up code, no behavior change.
Signed-off-by: Liang Li <liang.z.li@intel.com> Reviewed-by: Juan Quintela <quintela@redhat.com>al3 Reviewed-by: Amit Shah <amit.shah
migration: code clean up
Just clean up code, no behavior change.
Signed-off-by: Liang Li <liang.z.li@intel.com> Reviewed-by: Juan Quintela <quintela@redhat.com>al3 Reviewed-by: Amit Shah <amit.shah@redhat.com>al3 Signed-off-by: Juan Quintela <quintela@redhat.com>al3
show more ...
|
d1a8548c | 02-Nov-2015 |
Liang Li <liang.z.li@intel.com> |
migration: rename cancel to cleanup in SaveVMHandles
'cleanup' seems more appropriate than 'cancel'.
Signed-off-by: Liang Li <liang.z.li@intel.com> Reviewed-by: Juan Quintela <quintela@redhat.com>a
migration: rename cancel to cleanup in SaveVMHandles
'cleanup' seems more appropriate than 'cancel'.
Signed-off-by: Liang Li <liang.z.li@intel.com> Reviewed-by: Juan Quintela <quintela@redhat.com>al3 Reviewed-by: Amit Shah <amit.shah@redhat.com>al3 Signed-off-by: Juan Quintela <quintela@redhat.com>al3
show more ...
|