summaryrefslogtreecommitdiffstats
path: root/savevm.c
Commit message (Collapse)AuthorAgeFilesLines
* rdma: bugfix: ram_control_save_page()Michael R. Hines2013-07-231-1/+1
| | | | | | | | We were not checking for a valid 'bytes_sent' pointer before accessing it. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* rdma: new QEMUFileOps hooksMichael R. Hines2013-06-271-0/+59
| | | | | | | | | | | | | | | | | | | | | These are the prototypes and implementation of new hooks that RDMA takes advantage of to perform dynamic page registration. An optional hook is also introduced for a custom function to be able to override the default save_page function. Also included are the prototypes and accessor methods used by arch_init.c which invoke funtions inside savevm.c to call out to the hooks that may or may not have been overridden inside of QEMUFileOps. Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Chegu Vinod <chegu_vinod@hp.com> Tested-by: Chegu Vinod <chegu_vinod@hp.com> Tested-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* rdma: export qemu_fflush()Michael R. Hines2013-06-271-1/+1
| | | | | | | | | | | | | RDMA uses this to flush the control channel before sending its own message to handle page registrations. Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Chegu Vinod <chegu_vinod@hp.com> Tested-by: Chegu Vinod <chegu_vinod@hp.com> Tested-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* rdma: introduce qemu_file_mode_is_not_valid()Michael R. Hines2013-06-271-7/+13
| | | | | | | | | | | | | QEMUFileRDMA also has read and write modes. This function is now shared to reduce code duplication. Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Chegu Vinod <chegu_vinod@hp.com> Tested-by: Chegu Vinod <chegu_vinod@hp.com> Tested-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* rdma: export yield_until_fd_readable()Michael R. Hines2013-06-271-28/+0
| | | | | | | | | | | | | | The RDMA event channel can be made non-blocking just like a TCP socket. Exporting this function allows us to yield so that the QEMU monitor remains available. Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Chegu Vinod <chegu_vinod@hp.com> Tested-by: Chegu Vinod <chegu_vinod@hp.com> Tested-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* rdma: introduce qemu_update_position()Michael R. Hines2013-06-271-0/+5
| | | | | | | | | | | | | | RDMA writes happen asynchronously, and thus the performance accounting also needs to be able to occur asynchronously. This allows anybody to call into savevm.c to update both f->pos as well as into arch_init.c to update the acct_info structure with up-to-date values when the RDMA transfer actually completes. Reviewed-by: Juan Quintela <quintela@redhat.com> Tested-by: Chegu Vinod <chegu_vinod@hp.com> Tested-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* savevm: Fix potential memory leakStefan Weil2013-06-211-1/+2
| | | | | | | | The leak was reported by cppcheck. Fix it by moving the g_malloc0 after the argument validity check. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* savevm: qmp_xen_save_devices_state(): use error_setg_file_open()Luiz Capitulino2013-06-171-1/+1
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
* block: dump snapshot and image info to specified outputWenchao Xia2013-06-041-3/+4
| | | | | | | | | | | bdrv_snapshot_dump() and bdrv_image_info_dump() do not dump to a buffer now, some internal buffers are still used for format control, which have no chance to be truncated. As a result, these two functions have no more issue of truncation, and they can be used by both qemu and qemu-img with correct parameter specified. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: move qmp and info dump related code to block/qapi.cWenchao Xia2013-06-041-0/+1
| | | | | | | | | | | | | | | | | | | This patch is a pure code move patch, except following modification: 1 get_human_readable_size() is changed to static function. 2 dump_human_image_info() is renamed to bdrv_image_info_dump(). 3 in qmp_query_block() and qmp_query_blockstats, use bdrv_next(bs) instead of direct traverse of global array 'bdrv_states'. 4 collect_snapshots() and collect_image_info() are renamed, unused parameter *fmt in collect_image_info() is removed. 5 code style fix. To avoid conflict and tip better, macro in header file is BLOCK_QAPI_H instead of QAPI_H. Now block.h and snapshot.h are at the same level in include path, block_int.h and qapi.h will both include them. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: move snapshot code in block.c to block/snapshot.cWenchao Xia2013-06-041-22/+1
| | | | | | | | | | | All snapshot related code, except bdrv_snapshot_dump() and bdrv_is_snapshot(), is moved to block/snapshot.c. bdrv_snapshot_dump() will be moved to another file later. bdrv_is_snapshot() is not related with internal snapshot. It also fixes small code style errors reported by check script. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: drop bs_snapshots global variableStefan Hajnoczi2013-06-041-4/+15
| | | | | | | | | | | | | | | | | | | | | | | The bs_snapshots global variable points to the BlockDriverState which will be used to save vmstate. This is really a savevm.c concept but was moved into block.c:bdrv_snapshots() when it became clear that hotplug could result in a dangling pointer. While auditing the block layer's global state I came upon bs_snapshots and realized that a variable is not necessary here. Simply find the first BlockDriverState capable of internal snapshots each time this is needed. The behavior of bdrv_snapshots() is preserved across hotplug because new drives are always appended to the bdrv_states list. This means that calling the new find_vmstate_bs() function is idempotent - it returns the same BlockDriverState unless it was hot-unplugged. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* do not check pointers after dereferencing themPaolo Bonzini2013-06-011-4/+4
| | | | | | | | | | | Two instances, both spotted by Coverity. In one, two blocks were swapped. In the other, the check is not needed anymore. Cc: qemu-stable@nongnu.org Cc: qemu-trivial@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* qemu-file: do not use stdio for qemu_fdopenPaolo Bonzini2013-04-171-11/+90
| | | | | | | | | | This uses system calls directly for Unix file descriptors, so that the efficient writev_buffer can be used. Pay attention to the possibility of partial writes in writev. Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Orit Wassermann <owasserm@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qemu-file: drop socket_put_bufferPaolo Bonzini2013-04-171-13/+0
| | | | | | | | | It is enough to implement one of socket_writev_buffer and socket_put_buffer. Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Orit Wassermann <owasserm@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Merge remote-tracking branch 'stefanha/block' into stagingAnthony Liguori2013-04-151-4/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stefanha/block: rbd: add an asynchronous flush iotests: Add 'check -ssh' option to test Secure Shell block device. block: ssh: Use libssh2_sftp_fsync (if supported by libssh2) to flush to disk. block: Add support for Secure Shell (ssh) block device. ide: refuse WIN_READ_NATIVE_MAX on empty device qemu-iotests: filter QEMU_PROG in 051.out qemu-iotests: Add test for -drive options qemu-iotests: A few more bdrv_pread/pwrite tests block: Introduce bdrv_pwritev() for qcow2_save_vmstate savevm: Implement block_writev_buffer() block: Introduce bdrv_writev_vmstate Conflicts: savevm.c aliguori: add f->pos parameter to writev_buffer(). Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * savevm: Implement block_writev_buffer()Kevin Wolf2013-04-151-4/+21
| | | | | | | | | | | | | | | | Instead of breaking up RAM state into many small chunks, pass the iovec to the block layer for better performance. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | migration: simplify writev vs. non-writev logicPaolo Bonzini2013-04-091-13/+9
| | | | | | | | | | | | | | Check f->iovcnt in add_to_iovec, f->buf_index in qemu_put_buffer/byte. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* | migration: drop is_write complicationsPaolo Bonzini2013-04-091-48/+20
| | | | | | | | | | | | | | | | The same QEMUFile is never used for both read and write. Simplify the logic to simply look for presence or absence of the right ops. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* | migration: use a single I/O operation when writev_buffer is not definedPaolo Bonzini2013-04-091-15/+34
| | | | | | | | | | | | | | | | | | | | The recent patches to use vectored I/O for RAM migration caused a regression in savevm speed. To restore previous performance, add data to the buffer in qemu_put_buffer_async whenever writev_buffer is not available in the QEMUFile. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* | migration: set f->is_write and flush in add_to_iovecPaolo Bonzini2013-04-091-16/+9
|/ | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()Stefan Hajnoczi2013-04-021-1/+1
| | | | | | | | | 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 <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* Add qemu_put_buffer_asyncOrit Wasserman2013-03-261-8/+26
| | | | | | | | This allows us to add a buffer to the iovec to send without copying it into the static buffer, the buffer will be sent later when qemu_fflush is called. Signed-off-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* Use writev ops if availableOrit Wasserman2013-03-261-8/+23
| | | | | | | | | Update qemu_fflush and stdio_close to use writev ops if they are available Use the buffers stored in the iovec. Signed-off-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* Store the data to send also in iovecOrit Wasserman2013-03-261-2/+22
| | | | | | | | | All data is still copied into the static buffer. Adjacent iovecs are coalesced so we send one big buffer instead of many small buffers. Signed-off-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* Update bytes_xfer in qemu_put_byteOrit Wasserman2013-03-261-0/+2
| | | | | | Signed-off-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* Add socket_writev_buffer functionOrit Wasserman2013-03-261-0/+15
| | | | | Signed-off-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* savevm: Add VMSTATE_FLOAT64 helpersDavid Gibson2013-03-261-0/+23
| | | | | | | | | 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: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Juan Quintela <quintela@redhat.com>
* savevm: Add VMSTATE_UINT64_EQUAL helpersDavid Gibson2013-03-261-0/+21
| | | | | | | | | | | 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: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Juan Quintela <quintela@redhat.com>
* vmstate: Make vmstate_register() static inlineAndreas Färber2013-03-121-7/+0
| | | | | | | | | This avoids adding a duplicate stub for CONFIG_USER_ONLY. Suggested-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* migration: move rate limiting to QEMUFilePaolo Bonzini2013-03-111-14/+17
| | | | | | | | | | | | | | 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; in the next patch we can remove it and write directly to s->migration_file. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: use QEMUFile for migration channel lifetimePaolo Bonzini2013-03-111-0/+1
| | | | | | | | | | | 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 <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* qemu-file: simplify and export qemu_ftellPaolo Bonzini2013-03-111-12/+8
| | | | | | | | | | Force a flush when qemu_ftell is called. This simplifies the buffer magic (it also breaks qemu_ftell for input QEMUFiles, but we never use it). Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* qemu-file: add writable socket QEMUFilePaolo Bonzini2013-03-111-2/+31
| | | | | | | Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* qemu-file: check exit status when closing a pipe QEMUFilePaolo Bonzini2013-03-111-0/+3
| | | | | | | | | This is what exec_close does. Move this to the underlying QEMUFile. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* qemu-file: fsync a writable stdio QEMUFilePaolo Bonzini2013-03-111-0/+18
| | | | | | | | | This is what fd_close does. Prepare for switching to a QEMUFile. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: merge qemu_popen_cmd with qemu_popenPaolo Bonzini2013-03-111-14/+8
| | | | | | | | | | | There is no reason for outgoing exec migration to do popen manually anymore (the reason used to be that we needed the FILE* to make it non-blocking). Use qemu_popen_cmd. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* qemu-file: make qemu_fflush and qemu_file_set_error private againPaolo Bonzini2013-03-111-2/+2
| | | | | | | Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: yay, buffering is gonePaolo Bonzini2013-03-111-0/+1
| | | | | | | | | | | | | 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. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: run setup callbacks out of big lockPaolo Bonzini2013-03-111-0/+3
| | | | | | | | | Only the migration_bitmap_sync() call needs the iothread lock. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* qemu-file: temporarily expose qemu_file_set_error and qemu_fflushPaolo Bonzini2013-03-111-2/+2
| | | | | | | | | | | | | | | | | | Right now, migration cannot entirely rely on QEMUFile's automatic drop of I/O after an error, because it does its "real" I/O outside the put_buffer callback. To fix this until buffering is gone, expose qemu_file_set_error which we will use in buffered_flush. Similarly, buffered_flush is not a complete flush because some data may still reside in the QEMUFile's own buffer. This somewhat complicates the process of closing the migration thread. Again, when buffering is gone buffered_flush will disappear and calling qemu_fflush will not be needed; in the meanwhile, we expose the function for use in migration.c. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: use qemu_file_set_error to pass error codes back to qemu_savevm_statePaolo Bonzini2013-03-111-26/+18
| | | | | | | Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* qemu-file: pass errno from qemu_fflush via f->last_errorPaolo Bonzini2013-03-111-13/+12
| | | | | | | | | | This is done by almost all callers of qemu_fflush, move the code directly to qemu_fflush. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: push qemu_savevm_state_cancel out of qemu_savevm_state_*Paolo Bonzini2013-03-111-11/+4
| | | | | | | | | | This is useful, because it lets us keep the cancellation callbacks inside the big lock while pushing the others out. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: make qemu_ftell() public and support writable filesStefan Hajnoczi2013-02-121-2/+7
| | | | | | | | | | | | | | | Migration .save_live_iterate() functions return the number of bytes transferred. The easiest way of doing this is by calling qemu_ftell(f) at the beginning and end of the function to calculate the difference. Make qemu_ftell() public so that block-migration will be able to use it. Also adjust the ftell calculation for writable files where buf_offset does not include buf_size. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-id: 1360661835-28663-2-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* migration: restrict scope of incoming fd read handlerStefan Hajnoczi2013-02-111-4/+30
| | | | | | | | | | | | | | | | | | | | | 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 were be triggered if other coroutine users yielded (like the block layer's bdrv_write() function). Install the fd read only only when yielding for more data to become available. This prevents spurious coroutine entries which break code that assumes only a specific set of places can re-enter the coroutine. This patch fixes crashes in block/raw-posix.c that are triggered with "migrate -b" when qiov becomes a dangling pointer due to a spurious coroutine entry that frees qiov early. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1360598505-5512-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: introduce qemu_get_queue()Jason Wang2013-02-011-1/+1
| | | | | | | | | To support multiqueue, the patch introduce a helper qemu_get_queue() which is used to get the NetClientState of a device. The following patches would refactor this helper to support multiqueue. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Move XBZRLE encoding code to a separate file to allow testingOrit Wasserman2013-02-011-159/+0
| | | | | | | | Signed-off-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
* Merge remote-tracking branch 'quintela/thread.next' into stagingAnthony Liguori2013-01-211-5/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Juan Quintela (7) and Paolo Bonzini (6) # Via Juan Quintela * quintela/thread.next: migration: remove argument to qemu_savevm_state_cancel migration: Only go to the iterate stage if there is anything to send migration: unfold rest of migrate_fd_put_ready() into thread migration: move exit condition to migration thread migration: Add buffered_flush error handling migration: move beginning stage to the migration thread qemu-file: Only set last_error if it is not already set migration: fix off-by-one in buffered_rate_limit migration: remove double call to migrate_fd_close migration: make function static use XFER_LIMIT_RATIO consistently Protect migration_bitmap_sync() with the ramlist lock Unlock ramlist lock also in error case
| * migration: remove argument to qemu_savevm_state_cancelJuan Quintela2013-01-171-4/+4
| | | | | | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud