qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/4] s390x: Beautify machine reset


From: David Hildenbrand
Subject: Re: [PATCH 4/4] s390x: Beautify machine reset
Date: Fri, 22 Nov 2019 13:42:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

On 22.11.19 08:52, Janosch Frank wrote:
> * Add comments that tell you which diag308 subcode caused the reset
> * Sort by diag308 reset subcode
> 
> Signed-off-by: Janosch Frank <address@hidden>
> ---
>  hw/s390x/s390-virtio-ccw.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index c1d1440272..88f7758721 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -330,15 +330,7 @@ static void s390_machine_reset(MachineState *machine)
>      s390_cmma_reset();
>  
>      switch (reset_type) {
> -    case S390_RESET_EXTERNAL:
> -    case S390_RESET_REIPL:
> -        qemu_devices_reset();
> -        s390_crypto_reset();
> -
> -        /* configure and start the ipl CPU only */
> -        run_on_cpu(cs, s390_do_cpu_ipl, RUN_ON_CPU_NULL);
> -        break;
> -    case S390_RESET_MODIFIED_CLEAR:
> +    case S390_RESET_MODIFIED_CLEAR: /* Subcode 0 */
>          CPU_FOREACH(t) {
>              run_on_cpu(t, s390_do_cpu_full_reset, RUN_ON_CPU_NULL);
>          }
> @@ -346,7 +338,7 @@ static void s390_machine_reset(MachineState *machine)
>          s390_crypto_reset();
>          run_on_cpu(cs, s390_do_cpu_load_normal, RUN_ON_CPU_NULL);
>          break;
> -    case S390_RESET_LOAD_NORMAL:
> +    case S390_RESET_LOAD_NORMAL: /* Subcode 1 */
>          CPU_FOREACH(t) {
>              if (t == cs) {
>                  continue;
> @@ -357,6 +349,14 @@ static void s390_machine_reset(MachineState *machine)
>          run_on_cpu(cs, s390_do_cpu_initial_reset, RUN_ON_CPU_NULL);
>          run_on_cpu(cs, s390_do_cpu_load_normal, RUN_ON_CPU_NULL);
>          break;
> +    case S390_RESET_EXTERNAL: /* Externally triggered reboot */

BTW, if we decide to document this *somehow*, S390_RESET_EXTERNAL is
also used via the diag288 watchdog.

-- 

Thanks,

David / dhildenb




reply via email to

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