mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
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 now free its device descriptors and pending blocks. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
9a743e5ba3
commit
4ec7fcc7da
5 changed files with 54 additions and 8 deletions
5
vl.c
5
vl.c
|
@ -2934,6 +2934,11 @@ static int ram_save_live(QEMUFile *f, int stage, void *opaque)
|
|||
double bwidth = 0;
|
||||
uint64_t expected_time = 0;
|
||||
|
||||
if (stage < 0) {
|
||||
cpu_physical_memory_set_dirty_tracking(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cpu_physical_sync_dirty_bitmap(0, TARGET_PHYS_ADDR_MAX) != 0) {
|
||||
qemu_file_set_error(f);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue