qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]