[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 09/27] target/s390x: factor out handling of W
From: |
David Hildenbrand |
Subject: |
Re: [Qemu-devel] [PATCH v1 09/27] target/s390x: factor out handling of WAIT PSW into handle_wait() |
Date: |
Tue, 26 Sep 2017 15:04:23 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
>> +
>> +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
- [Qemu-devel] [PATCH v1 05/27] s390/tcg: turn INTERRUPT_EXT into a mask, (continued)
- [Qemu-devel] [PATCH v1 05/27] s390/tcg: turn INTERRUPT_EXT into a mask, David Hildenbrand, 2017/09/18
- [Qemu-devel] [PATCH v1 06/27] s390x/tcg: injection of emergency signals and extarnal calls, David Hildenbrand, 2017/09/18
- [Qemu-devel] [PATCH v1 08/27] s390x/tcg: a CPU cannot switch state due to an interrupt, David Hildenbrand, 2017/09/18
- [Qemu-devel] [PATCH v1 07/27] s390x/tcg: STOPPED cpus can never wake up, David Hildenbrand, 2017/09/18
- [Qemu-devel] [PATCH v1 09/27] target/s390x: factor out handling of WAIT PSW into handle_wait(), David Hildenbrand, 2017/09/18
- [Qemu-devel] [PATCH v1 10/27] s390x/kvm: pass ipb directly into handle_sigp(), David Hildenbrand, 2017/09/18
- [Qemu-devel] [PATCH v1 11/27] s390x/kvm: generalize SIGP stop and restart interrupt injection, David Hildenbrand, 2017/09/18
- [Qemu-devel] [PATCH v1 12/27] s390x/kvm: factor out storing of CPU status, David Hildenbrand, 2017/09/18
- [Qemu-devel] [PATCH v1 15/27] s390x/kvm: drop two debug prints, David Hildenbrand, 2017/09/18