int vm_start(struct uc_struct* uc) { if (resume_all_vcpus(uc)) { return -1; } return 0; }
void main_loop(void) { int r; #ifdef CONFIG_HAX if (hax_enabled()) hax_sync_vcpus(); #endif for (;;) { do { #ifdef CONFIG_PROFILER int64_t ti; #endif tcg_cpu_exec(); #ifdef CONFIG_PROFILER ti = profile_getclock(); #endif main_loop_wait(qemu_calculate_timeout()); #ifdef CONFIG_PROFILER dev_time += profile_getclock() - ti; #endif qemu_log_rotation_poll(); } while (vm_can_run()); if (qemu_debug_requested()) vm_stop(EXCP_DEBUG); if (qemu_shutdown_requested()) { if (no_shutdown) { vm_stop(0); no_shutdown = 0; } else { if (savevm_on_exit != NULL) { /* Prior to saving VM to the snapshot file, save HW config * settings for that VM, so we can match them when VM gets * loaded from the snapshot. */ snaphost_save_config(savevm_on_exit); do_savevm(cur_mon, savevm_on_exit); } break; } } if (qemu_reset_requested()) { pause_all_vcpus(); qemu_system_reset(); resume_all_vcpus(); } if (qemu_powerdown_requested()) qemu_system_powerdown(); if ((r = qemu_vmstop_requested())) vm_stop(r); } pause_all_vcpus(); }
static int modified_clear_reset(S390CPU *cpu) { S390CPUClass *scc = S390_CPU_GET_CLASS(cpu); pause_all_vcpus(); cpu_synchronize_all_states(); cpu_full_reset_all(); io_subsystem_reset(); scc->load_normal(CPU(cpu)); cpu_synchronize_all_post_reset(); resume_all_vcpus(); return 0; }
static int modified_clear_reset(S390CPU *cpu) { S390CPUClass *scc = S390_CPU_GET_CLASS(cpu); CPUState *t; pause_all_vcpus(); cpu_synchronize_all_states(); CPU_FOREACH(t) { run_on_cpu(t, s390_do_cpu_full_reset, t); } cmma_reset(cpu); subsystem_reset(); scc->load_normal(CPU(cpu)); cpu_synchronize_all_post_reset(); resume_all_vcpus(); return 0; }
void qemu_main_loop_start(void) { resume_all_vcpus(); }