>> + >> +void handle_wait(S390CPU *cpu) > > "handle_wait" is a very generic name ... could you maybe at least name > this "s390x_handle_wait" or so?
sure, will do, thanks! > >> +{ >> + cpu_synchronize_state(CPU(cpu)); >> + if (s390_cpu_halt(cpu) == 0) { >> +#ifndef CONFIG_USER_ONLY >> + if (is_special_wait_psw(cpu->env.psw.addr)) { >> + qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); >> + } else { >> + qemu_system_guest_panicked(NULL); >> + } >> +#endif >> + } >> +} [...] >> - cpu_synchronize_state(cs); > > Maybe we should rather keep the cpu_synchronize_state() here instead of > putting it in helper.c? No other function in helper.c seems to call that > on its own yet... Don't have a strong opinion on this, as long as it works :) > >> - if (s390_cpu_halt(cpu) == 0) { >> - if (is_special_wait_psw(cs)) { >> - >> qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); >> - } else { >> - qemu_system_guest_panicked(NULL); >> - } >> - } >> + handle_wait(cpu); >> r = EXCP_HALTED; >> break; >> case ICPT_CPU_STOP: >> > > Thomas > -- Thanks, David