qemu-e2k/migration
Peter Xu 7a9ddfbfae migration: better error handling with QEMUFile
If the postcopy down due to some reason, we can always see this on dst:

  qemu-system-x86_64: RP: Received invalid message 0x0000 length 0x0000

However in most cases that's not the real issue. The problem is that
qemu_get_be16() has no way to show whether the returned data is valid or
not, and we are _always_ assuming it is valid. That's possibly not wise.

The best approach to solve this would be: refactoring QEMUFile interface
to allow the APIs to return error if there is. However it needs quite a
bit of work and testing. For now, let's explicitly check the validity
first before using the data in all places for qemu_get_*().

This patch tries to fix most of the cases I can see. Only if we are with
this, can we make sure we are processing the valid data, and also can we
make sure we can capture the channel down events correctly.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180208103132.28452-2-peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2018-02-14 10:34:56 +00:00
..
Makefile.objs buildsys: Move rdma libs to per object 2017-09-22 10:20:34 +08:00
block.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
block.h migration: disable auto-converge during bulk block migration 2017-09-27 11:27:14 +01:00
channel.c migration: Route errors down through migration_channel_connect 2018-02-06 10:55:12 +00:00
channel.h migration: Route errors down through migration_channel_connect 2018-02-06 10:55:12 +00:00
colo-comm.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
colo-failover.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
colo.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
exec.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
exec.h migration: Export exec.c functions in its own file 2017-06-01 18:49:22 +02:00
fd.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
fd.h migration: Export fd.c functions in its own file 2017-06-01 18:49:22 +02:00
global_state.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
migration.c migration: better error handling with QEMUFile 2018-02-14 10:34:56 +00:00
migration.h Drop superfluous includes of qapi-types.h and test-qapi-types.h 2018-02-09 05:05:11 +01:00
page_cache.c migration: Make sure that we pass the right cache size 2017-10-29 14:06:15 +01:00
page_cache.h migration: Make cache_init() take an error parameter 2017-10-23 18:03:25 +02:00
postcopy-ram.c migration: Revert postcopy-blocktime commit set 2018-01-23 10:08:05 +00:00
postcopy-ram.h migration: postcopy_place_page factoring out 2017-10-23 18:03:39 +02:00
qemu-file-channel.c migration: Split qemu-file.h 2017-06-01 18:49:22 +02:00
qemu-file-channel.h migration: Export qemu-file-channel.c functions in its own file 2017-05-18 19:20:50 +02:00
qemu-file.c migration: Remove unneeded includes 2017-06-14 11:10:19 +02:00
qemu-file.h migration: ram_control_* are implemented in qemu_file 2017-06-13 11:00:45 +02:00
qjson.c migration: Move qjson.h to migration/ 2017-05-18 19:20:59 +02:00
qjson.h migration: Move qjson.h to migration/ 2017-05-18 19:20:59 +02:00
ram.c migration: better error handling with QEMUFile 2018-02-14 10:34:56 +00:00
ram.h Include qapi/qmp/qdict.h exactly where needed 2018-02-09 13:52:15 +01:00
rdma.c migration: Allow migrate_fd_connect to take an Error * 2018-02-06 10:55:12 +00:00
rdma.h migration: Export rdma.c functions in its own file 2017-06-01 18:49:23 +02:00
savevm.c migration: better error handling with QEMUFile 2018-02-14 10:34:56 +00:00
savevm.h migration: Create load_setup()/cleanup() methods 2017-07-10 17:52:21 +01:00
socket.c migration: Route errors down through migration_channel_connect 2018-02-06 10:55:12 +00:00
socket.h migration: Export socket.c functions in its own file 2017-06-01 18:49:23 +02:00
tls.c migration: Route errors down through migration_channel_connect 2018-02-06 10:55:12 +00:00
tls.h migration: Export tls.c functions in its own file 2017-06-01 18:49:23 +02:00
trace-events migration: Route errors down through migration_channel_connect 2018-02-06 10:55:12 +00:00
vmstate-types.c migration: Route more error paths 2017-09-27 11:44:18 +01:00
vmstate.c migration: wire vmstate_save_state errors up to vmstate_subsection_save 2017-09-27 11:38:21 +01:00
xbzrle.c migration: Create migration/xbzrle.h 2017-05-18 18:04:54 +02:00
xbzrle.h migration: Create migration/xbzrle.h 2017-05-18 18:04:54 +02:00