Lines Matching full:from

49  * from the migration guest workload.
91 void migrate_prepare_for_dirty_mem(QTestState *from) in migrate_prepare_for_dirty_mem() argument
94 * The guest workflow iterates from start_address to in migrate_prepare_for_dirty_mem()
105 qtest_writeq(from, start_address + MAGIC_OFFSET, MAGIC_MARKER); in migrate_prepare_for_dirty_mem()
108 void migrate_wait_for_dirty_mem(QTestState *from, QTestState *to) in migrate_wait_for_dirty_mem() argument
131 * dirty again from the guest workload. Note the in migrate_wait_for_dirty_mem()
137 watch_byte = qtest_readb(from, watch_address); in migrate_wait_for_dirty_mem()
140 } while (qtest_readb(from, watch_address) == watch_byte); in migrate_wait_for_dirty_mem()
146 * Our ASM test will have been incrementing one byte from each page from in check_guests_ram()
211 static void migrate_start_set_capabilities(QTestState *from, QTestState *to, in migrate_start_set_capabilities() argument
216 * are from qapi-types-migration.h. in migrate_start_set_capabilities()
222 if (from) { in migrate_start_set_capabilities()
223 migrate_set_capability(from, in migrate_start_set_capabilities()
236 migrate_set_capability(from, "events", true); in migrate_start_set_capabilities()
247 migrate_set_parameter_int(from, "multifd-channels", in migrate_start_set_capabilities()
256 int migrate_start(QTestState **from, QTestState **to, const char *uri, in migrate_start() argument
385 *from = qtest_init_ext(QEMU_ENV_SRC, cmd_source, capabilities, true); in migrate_start()
386 qtest_qmp_set_event_callback(*from, in migrate_start()
427 migrate_start_set_capabilities(*from, *to, args); in migrate_start()
432 void migrate_end(QTestState *from, QTestState *to, bool test_dest) in migrate_end() argument
436 qtest_quit(from); in migrate_end()
471 QTestState *from, *to; in migrate_postcopy_prepare() local
477 if (migrate_start(&from, &to, "defer", &args->start)) { in migrate_postcopy_prepare()
482 args->postcopy_data = args->start_hook(from, to); in migrate_postcopy_prepare()
485 migrate_ensure_non_converge(from); in migrate_postcopy_prepare()
486 migrate_prepare_for_dirty_mem(from); in migrate_postcopy_prepare()
495 /* Wait for the first serial output from the source */ in migrate_postcopy_prepare()
497 wait_for_suspend(from, &src_state); in migrate_postcopy_prepare()
499 migrate_qmp(from, to, NULL, NULL, "{}"); in migrate_postcopy_prepare()
501 migrate_wait_for_dirty_mem(from, to); in migrate_postcopy_prepare()
503 *from_ptr = from; in migrate_postcopy_prepare()
509 static void migrate_postcopy_complete(QTestState *from, QTestState *to, in migrate_postcopy_complete() argument
514 wait_for_migration_complete(from); in migrate_postcopy_complete()
529 args->end_hook(from, to, args->postcopy_data); in migrate_postcopy_complete()
533 migrate_end(from, to, true); in migrate_postcopy_complete()
538 QTestState *from, *to; in test_postcopy_common() local
540 if (migrate_postcopy_prepare(&from, &to, args)) { in test_postcopy_common()
543 migrate_postcopy_start(from, to, &src_state); in test_postcopy_common()
544 migrate_postcopy_complete(from, to, args); in test_postcopy_common()
556 static void postcopy_recover_fail(QTestState *from, QTestState *to, in postcopy_recover_fail() argument
577 qtest_qmp_fds_assert_success(from, &pair1[0], 1, in postcopy_recover_fail()
586 * emulate the 1st byte of a real recovery, but stops from there to in postcopy_recover_fail()
608 migrate_qmp(from, to, "fd:fd-mig", NULL, "{'resume': true}"); in postcopy_recover_fail()
614 migration_event_wait(from, "postcopy-recover-setup"); in postcopy_recover_fail()
623 migration_event_wait(from, "postcopy-paused"); in postcopy_recover_fail()
633 migration_event_wait(from, "postcopy-recover"); in postcopy_recover_fail()
634 wait_for_postcopy_status(from, "postcopy-recover"); in postcopy_recover_fail()
637 migrate_pause(from); in postcopy_recover_fail()
644 wait_for_postcopy_status(from, "postcopy-paused"); in postcopy_recover_fail()
668 QTestState *from, *to; in test_postcopy_recovery_common() local
680 if (migrate_postcopy_prepare(&from, &to, args)) { in test_postcopy_recovery_common()
685 migrate_set_parameter_int(from, "max-postcopy-bandwidth", 4096); in test_postcopy_recovery_common()
688 migrate_postcopy_start(from, to, &src_state); in test_postcopy_recovery_common()
694 wait_for_migration_status(from, "postcopy-active", NULL); in test_postcopy_recovery_common()
700 migrate_pause(from); in test_postcopy_recovery_common()
708 wait_for_postcopy_status(from, "postcopy-paused"); in test_postcopy_recovery_common()
715 postcopy_recover_fail(from, to, args->postcopy_recovery_fail_stage); in test_postcopy_recovery_common()
721 * from the broken migration channel; tell the destination to in test_postcopy_recovery_common()
731 migrate_qmp(from, to, uri, NULL, "{'resume': true}"); in test_postcopy_recovery_common()
734 migrate_set_parameter_int(from, "max-postcopy-bandwidth", 0); in test_postcopy_recovery_common()
736 migrate_postcopy_complete(from, to, args); in test_postcopy_recovery_common()
741 QTestState *from, *to; in test_precopy_common() local
748 if (migrate_start(&from, &to, args->listen_uri, &args->start)) { in test_precopy_common()
753 data_hook = args->start_hook(from, to); in test_precopy_common()
756 /* Wait for the first serial output from the source */ in test_precopy_common()
759 wait_for_suspend(from, &src_state); in test_precopy_common()
763 migrate_ensure_non_converge(from); in test_precopy_common()
764 migrate_prepare_for_dirty_mem(from); in test_precopy_common()
773 qtest_qmp_assert_success(from, "{ 'execute' : 'stop'}"); in test_precopy_common()
774 wait_for_stop(from, &src_state); in test_precopy_common()
775 migrate_ensure_converge(from); in test_precopy_common()
800 migrate_qmp_fail(from, args->connect_uri, out_channels, "{}"); in test_precopy_common()
804 migrate_qmp(from, to, args->connect_uri, out_channels, "{}"); in test_precopy_common()
816 wait_for_migration_fail(from, allow_active); in test_precopy_common()
829 wait_for_migration_pass(from, &src_state); in test_precopy_common()
832 migrate_wait_for_dirty_mem(from, to); in test_precopy_common()
834 migrate_ensure_converge(from); in test_precopy_common()
840 wait_for_migration_complete(from); in test_precopy_common()
842 wait_for_stop(from, &src_state); in test_precopy_common()
845 wait_for_migration_complete(from); in test_precopy_common()
868 args->end_hook(from, to, data_hook); in test_precopy_common()
871 migrate_end(from, to, args->result == MIG_TEST_SUCCEED); in test_precopy_common()
908 QTestState *from, *to; in test_file_common() local
912 if (migrate_start(&from, &to, args->listen_uri, &args->start)) { in test_file_common()
934 data_hook = args->start_hook(from, to); in test_file_common()
937 migrate_ensure_converge(from); in test_file_common()
941 qtest_qmp_assert_success(from, "{ 'execute' : 'stop'}"); in test_file_common()
942 wait_for_stop(from, &src_state); in test_file_common()
946 migrate_qmp_fail(from, args->connect_uri, NULL, "{}"); in test_file_common()
950 migrate_qmp(from, to, args->connect_uri, NULL, "{}"); in test_file_common()
951 wait_for_migration_complete(from); in test_file_common()
973 args->end_hook(from, to, data_hook); in test_file_common()
976 migrate_end(from, to, args->result == MIG_TEST_SUCCEED); in test_file_common()
979 void *migrate_hook_start_precopy_tcp_multifd_common(QTestState *from, in migrate_hook_start_precopy_tcp_multifd_common() argument
983 migrate_set_parameter_str(from, "multifd-compression", method); in migrate_hook_start_precopy_tcp_multifd_common()
986 /* Start incoming migration from the 1st socket */ in migrate_hook_start_precopy_tcp_multifd_common()