qemu-patch-raspberry4/migration
Denis V. Lunev ea6a55bcc0 migration (postcopy): move bdrv_invalidate_cache_all of of coroutine context
There is a possibility to hit an assert in qcow2_get_specific_info that
s->qcow_version is undefined. This happens when VM in starting from
suspended state, i.e. it processes incoming migration, and in the same
time 'info block' is called.

The problem is that qcow2_invalidate_cache() closes the image and
memset()s BDRVQcowState in the middle.

The patch moves processing of bdrv_invalidate_cache_all out of
coroutine context for postcopy migration to avoid that. This function
is called with the following stack:
  process_incoming_migration_co
  qemu_loadvm_state
  qemu_loadvm_state_main
  loadvm_process_command
  loadvm_postcopy_handle_run

Signed-off-by: Denis V. Lunev <den@openvz.org>
Tested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Juan Quintela <quintela@redhat.com>
CC: Amit Shah <amit.shah@redhat.com>
Message-Id: <1456304019-10507-3-git-send-email-den@openvz.org>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
2016-02-26 20:40:08 +05:30
..
block.c block-migration: acquire AioContext as necessary 2016-02-25 13:14:18 +02:00
exec.c migration: rename 'file' in MigrationState to 'to_dst_file' 2016-02-05 19:09:50 +05:30
fd.c migration: rename 'file' in MigrationState to 'to_dst_file' 2016-02-05 19:09:50 +05:30
Makefile.objs postcopy: OS support test 2015-11-10 15:00:26 +01:00
migration.c migration (ordinary): move bdrv_invalidate_cache_all of of coroutine context 2016-02-26 20:39:50 +05:30
postcopy-ram.c migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD 2016-02-26 15:05:25 +05:30
qemu-file-buf.c migration: Clean up includes 2016-01-29 15:07:22 +00:00
qemu-file-internal.h Split struct QEMUFile out 2014-12-16 17:47:36 +05:30
qemu-file-stdio.c migration: Clean up includes 2016-01-29 15:07:22 +00:00
qemu-file-unix.c migration: Clean up includes 2016-01-29 15:07:22 +00:00
qemu-file.c migration: Clean up includes 2016-01-29 15:07:22 +00:00
ram.c migration: fix incorrect memory_global_dirty_log_start outside BQL 2016-02-16 15:34:43 +01:00
rdma.c migration: rename 'file' in MigrationState to 'to_dst_file' 2016-02-05 19:09:50 +05:30
savevm.c migration (postcopy): move bdrv_invalidate_cache_all of of coroutine context 2016-02-26 20:40:08 +05:30
tcp.c migration: rename 'file' in MigrationState to 'to_dst_file' 2016-02-05 19:09:50 +05:30
unix.c migration: rename 'file' in MigrationState to 'to_dst_file' 2016-02-05 19:09:50 +05:30
vmstate.c migration: Clean up includes 2016-01-29 15:07:22 +00:00
xbzrle.c migration: Clean up includes 2016-01-29 15:07:22 +00:00