- 20 Jul, 2012 5 commits
-
-
Juan Quintela authored
This patch splits stage 1 to its own function for both save_live users, ram and block. It is just a copy of the function, removing the parts of the other stages. Optimizations would came later. Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
Enable the creation of a method to tell migration if that section is active and should be migrate. We use it for blk-migration, that is normally not active. We don't create the method for RAM, as setups without RAM are very strange O:-) Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
Intead of abusing stage with value -1. Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
Notice that the live migration users never unregister, so no problem about freeing the ops structure. Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
This would make easier to add more operations in the next patches. Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
- 29 Jun, 2012 3 commits
-
-
Juan Quintela authored
If buffers are full, don't iterate, just exit. Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
This allows to know how long each section takes to save. An awk script like this tells us sections that takes more that 10ms $1 ~ /savevm_state_iterate_end/ { /* Print savevm_section_end line when > 10ms duration */ if ($2 > 10000) { printf("%s times_missing=%u\n", $0, times_missing++); } } Signed-off-by:
Juan Quintela <quintela@redhat.com> fix ws tracepoints Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Isaku Yamahata authored
Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp>
-
- 18 Jun, 2012 1 commit
-
-
Anthony Liguori authored
This makes it easier to remove it from BusInfo. Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> [AF: Drop now unnecessary NULL initialization in scsibus_get_dev_path()] Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
- 15 Jun, 2012 1 commit
-
-
Paolo Bonzini authored
Writing vm state uses bdrv_pwrite, so it will automatically get flushes in writethrough mode. But doing a flush at the end in writeback mode is probably a good idea anyway. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- 15 Apr, 2012 1 commit
-
-
Stefan Weil authored
tb.time is a time value, but not necessarily of the same size as time_t: while time_t is 64 bit for w64, tb.time still is 32 bit only. Therefore we need en explicit conversion. Signed-off-by:
Stefan Weil <sw@weilnetz.de>
-
- 19 Mar, 2012 1 commit
-
-
Stefano Stabellini authored
- add an "is_ram" flag to SaveStateEntry; - register_savevm_live sets is_ram for live_savevm devices; - introduce a "xen-save-devices-state" QAPI command that can be used to save the state of all devices, but not the RAM or the block devices of the VM. Changes in v8: - rename save-devices-state to xen-save-devices-state. Changes in v7: - rename save_devices to save-devices-state. Changes in v6: - remove the is_ram parameter from register_savevm_live and sets is_ram if the device is a live_savevm device; - introduce save_devices as a QAPI command, write a better description for it; - fix CODING_STYLE; - introduce a new doc to explain the save format used by save_devices. Signed-off-by:
Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by:
Anthony Liguori <aliguori@us.ibm.com> Acked-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
- 17 Mar, 2012 1 commit
-
-
Amos Kong authored
VMSTATE_VARRAY_UINT32() is used in hw/ds1225y.c, and we checked VMS_VARRAY_UINT32 bit of field->flags in vmstate_load_state(), but we don't check this bit in vmstate_save_state(). Signed-off-by:
Amos Kong <akong@redhat.com> Acked-by:
Juan Quintela <quintela@redhat.com> Acked-by:
Hervé Poussineau <hpoussin@reactos.org> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- 15 Mar, 2012 2 commits
-
-
Luiz Capitulino authored
The migrate command is one of those commands where HMP and QMP completely mix up together. This made the conversion to the QAPI (which separates the command into QMP and HMP parts) a bit difficult. The first important change to be noticed is that this commit completes the removal of the Monitor object from migration code, started by the previous commit. Another important and tricky change is about supporting the non-detached mode. That is, if the user doesn't pass '-d' the migrate command will lock the monitor and will only release it when migration is finished. To support this in the new HMP command (hmp_migrate()), it is necessary to create a timer which runs every second and checks if the migration is still active. If it is, the timer callback will re-schedule itself to run one second in the future. If the migration has already finished, the monitor lock is released and the user can use it normally. All these changes should be transparent to the user. Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Luiz Capitulino authored
The Monitor object is passed back and forth within the migration/savevm code so that it can print errors and progress to the user. However, that approach assumes a HMP monitor, being completely invalid in QMP. This commit drops almost every single usage of the Monitor object, all monitor_printf() calls have been converted into DPRINTF() ones. There are a few remaining Monitor objects, those are going to be dropped by the next commit. Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
- 08 Jan, 2012 1 commit
-
-
Avi Kivity authored
rom/device regions have a ram_addr that is composed of both an I/O handler (low bits) and RAM region (high bits); but qemu_ram_set_idstr() expects just a RAM region. Mask the I/O handler to make it happy. Tested-by:
Stefan Weil <sw@weilnetz.de> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
- 04 Jan, 2012 1 commit
-
-
Avi Kivity authored
Currently creating a memory region automatically registers it for live migration. This differs from other state (which is enumerated in a VMStateDescription structure) and ties the live migration code into the memory core. Decouple the two by introducing a separate API, vmstate_register_ram(), for registering a RAM block for migration. Currently the same implementation is reused, but later it can be moved into a separate list, and registrations can be moved to VMStateDescription blocks. Signed-off-by:
Avi Kivity <avi@redhat.com>
-
- 15 Dec, 2011 1 commit
-
-
Kevin Wolf authored
This is a compatible extension to the snapshot header format that allows saving a 64 bit VM state size. Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- 12 Dec, 2011 4 commits
-
-
Eduardo Habkost authored
This is what qemu_fclose() expects. Changes v1 -> v2: - Add braces to if statement to match coding style Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Eduardo Habkost authored
This is what qemu_fclose() expects. Changes v1 -> v2: - On success, keep returning pclose() return value, instead of always 0. Changes v2 -> v3: - Add braces on if statements to match coding style Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Eduardo Habkost authored
This will make sure no error will be missed as long as callers always check for qemu_fclose() return value. For reference, this is the complete list of qemu_fclose() callers: - exec_close(): already fixed to check for negative values, not -1 - migrate_fd_cleanup(): already fixed to consider only negative values as error, not any non-zero value - exec_accept_incoming_migration(): no return value check (yet) - fd_accept_incoming_migration(): no return value check (yet) - tcp_accept_incoming_migration(): no return value check (yet) - unix_accept_incoming_migration(): no return value check (yet) - do_savevm(): no return value check (yet) - load_vmstate(): no return value check (yet) Changes v1 -> v2: - Add small comment about the need to return previously-spotted errors Changes v2 -> v3: - Add braces to "if" statements to match coding style Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Eduardo Habkost authored
Some code uses qemu_file_set_error() already, so use it everywhere when setting last_error, for consistency. Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- 05 Dec, 2011 1 commit
-
-
Stefan Hajnoczi authored
Many places in QEMU call qemu_aio_flush() to complete all pending asynchronous I/O. Most of these places actually want to drain all block requests but there is no block layer API to do so. This patch introduces the bdrv_drain_all() API to wait for requests across all BlockDriverStates to complete. As a bonus we perform checks after qemu_aio_wait() to ensure that requests really have finished. Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- 02 Dec, 2011 1 commit
-
-
Dong Xu Wang authored
Signed-off-by:
Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 21 Nov, 2011 1 commit
-
-
Anthony Liguori authored
Now when you try to migrate with ivshmem, you get a proper QMP error: (qemu) migrate tcp:localhost:1025 Migration is disabled when using feature 'peer mode' in device 'ivshmem' (qemu) Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- 01 Nov, 2011 1 commit
-
-
Juan Quintela authored
Signed-off-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- 21 Oct, 2011 1 commit
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 20 Oct, 2011 11 commits
-
-
Juan Quintela authored
Make *save_live() return negative values when there is one error, and updates all callers to check for the error. Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
Now the field contains the last error name, so rename acordingly. Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Juan Quintela authored
Now the function returned errno, so it is better the new name. Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Juan Quintela authored
make functions propagate errno, instead of just using -EIO. Add a comment about what are the return value of qemu_savevm_state_iterate(). Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
We normally already have an errno value. When not, abuse EIO. Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
This reverts commit eb60260d . Conflicts: savevm.c We changed qemu_peek_byte() prototype, just fixed the rejects. Signed-off-by: Juan Quintela<quintela@redhat.com> Reviewed-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Juan Quintela authored
We add qemu_peek_buffer, that is identical to qemu_get_buffer, just that it don't update f->buf_index. We add a paramenter to qemu_peek_byte() to be able to peek more than one byte. Once this is done, to see if we have a subsection we look: - 1st byte is QEMU_VM_SUBSECTION - 2nd byte is a length, and is bigger than section name - 3rd element is a string that starts with section_name So, we shouldn't have false positives (yes, content could still get us wrong but probabilities are really low). v2: - Alex Williamsom found that we could get negative values on index. - Rework code to fix that part. - Rewrite qemu_get_buffer() using qemu_peek_buffer() v3: - return "done" on error case v4: - fix qemu_file_skip() off by one. Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
Signed-off-by: Juan Quintela<quintela@redhat.com>
-
Juan Quintela authored
This patch will make moving code on next patches and having checkpatch happy easier. Signed-off-by: Juan Quintela<quintela@redhat.com> Reviewed-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Juan Quintela authored
We will need on next patch to be able to lookahead on next patch v2: rename "used" to "pending" (Alex Williams) Signed-off-by: Juan Quintela<quintela@redhat.com> Reviewed-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- 19 Oct, 2011 1 commit
-
-
Luiz Capitulino authored
qemu_savevm_state() has some logic to stop the VM and to (or not to) resume it. But this seems to be a big noop, as qemu_savevm_state() is only called by do_savevm() when the VM is already stopped. So, let's drop qemu_savevm_state()'s stop VM logic. Reviewed-by:
Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
- 04 Oct, 2011 1 commit
-
-
Luiz Capitulino authored
Next commit will convert the query-status command to use the RunState type as generated by the QAPI. In order to "transparently" replace the current enum by the QAPI one, we have to make some changes to some enum values. As the changes are simple renames, I'll do them in one shot. The changes are: - Rename the prefix from RSTATE_ to RUN_STATE_ - RUN_STATE_SAVEVM to RUN_STATE_SAVE_VM - RUN_STATE_IN_MIGRATE to RUN_STATE_INMIGRATE - RUN_STATE_PANICKED to RUN_STATE_INTERNAL_ERROR - RUN_STATE_POST_MIGRATE to RUN_STATE_POSTMIGRATE - RUN_STATE_PRE_LAUNCH to RUN_STATE_PRELAUNCH - RUN_STATE_PRE_MIGRATE to RUN_STATE_PREMIGRATE - RUN_STATE_RESTORE to RUN_STATE_RESTORE_VM - RUN_STATE_PRE_MIGRATE to RUN_STATE_FINISH_MIGRATE Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-