qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Janosch Frank <frankja@linux.ibm.com>, Cornelia Huck <cohuck@redhat.com>
Cc: thuth@redhat.com, pmorel@linux.ibm.com, qemu-devel@nongnu.org,
	borntraeger@de.ibm.com, qemu-s390x@nongnu.org,
	mihajlov@linux.ibm.com
Subject: Re: [PATCH 4/4] s390x: Beautify machine reset
Date: Fri, 22 Nov 2019 13:25:25 +0100	[thread overview]
Message-ID: <925e1c0e-bf63-a244-df72-2f477d014666@redhat.com> (raw)
In-Reply-To: <8217f5a5-1700-9371-d642-8520df9df0ed@linux.ibm.com>

On 22.11.19 13:22, Janosch Frank wrote:
> On 11/22/19 1:10 PM, Cornelia Huck wrote:
>> On Fri, 22 Nov 2019 12:47:44 +0100
>> David Hildenbrand <david@redhat.com> wrote:
>>
>>> On 22.11.19 12:46, Janosch Frank wrote:
>>>> On 11/22/19 11:59 AM, David Hildenbrand wrote:
>>>>> 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 <frankja@linux.ibm.com>
>>>>>> ---
>>>>>>     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 */
>>>>>
>>>>> IMHO "Subcode X" isn't of much help here. We're out of diag handling.
>>>>>
>>>>> I'd suggest to just document the subcodes along with the definitions, if
>>>>> really needed, and drop this patch, at least I don't quite see the value
>>>>> of moving code around here... or is the code shuffling of any value on
>>>>> your prot virt patches?
>>>>>   
>>>>
>>>> It keeps me from consulting the POP every time I need to change things
>>>> in the machine resets. This is basically a 1:1 mapping of diag 308
>>>> subcodes to machine resets, so why don't we want to make that obvious
>>>> and order them by the subcodes?
>>>>    
>>>
>>> Because it is not a 1:1 mapping: S390_RESET_EXTERNAL
>>>
>>
>> Tack the explanation onto the definitions of S390_RESET_, then?
>> Probably still quicker than consulting the POP :)
>>
> 
> Does it really bother you that much, that I add some explanations to the
> things we're doing. The external reset also gets a comment so Conni
> won't need that much coffee anymore to understand the code :-)
> 

I'm really sorry, but I fail to see how "Subcode 0" is *any* better than 
S390_RESET_MODIFIED_CLEAR (and avoids consulting the PoP) and why the 
order should matter at all here to make it easier to understand.

I don't NACK this, I just find it *completely* useless :)

-- 

Thanks,

David / dhildenb



  reply	other threads:[~2019-11-22 12:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22  7:52 [PATCH 0/4] s390x: Reset cleanup Janosch Frank
2019-11-22  7:52 ` [PATCH 1/4] s390x: Don't do a normal reset on the initial cpu Janosch Frank
2019-11-22 10:55   ` David Hildenbrand
2019-11-22  7:52 ` [PATCH 2/4] s390x: Cleanup cpu resets Janosch Frank
2019-11-22 10:35   ` Philippe Mathieu-Daudé
2019-11-22 13:07     ` Janosch Frank
2019-11-22 11:14   ` David Hildenbrand
2019-11-22 12:20     ` [PATCH] Remove wrappers Janosch Frank
2019-11-22 12:23       ` David Hildenbrand
2019-11-22 12:28         ` Janosch Frank
2019-11-22  7:52 ` [PATCH 3/4] s390x: Beautify diag308 handling Janosch Frank
2019-11-22 10:56   ` David Hildenbrand
2019-11-22  7:52 ` [PATCH 4/4] s390x: Beautify machine reset Janosch Frank
2019-11-22 10:59   ` David Hildenbrand
2019-11-22 11:46     ` Janosch Frank
2019-11-22 11:47       ` David Hildenbrand
2019-11-22 12:10         ` Cornelia Huck
2019-11-22 12:22           ` Janosch Frank
2019-11-22 12:25             ` David Hildenbrand [this message]
2019-11-22 12:30               ` Janosch Frank
2019-11-22 12:42   ` David Hildenbrand
2019-11-22 10:10 ` [PATCH 0/4] s390x: Reset cleanup no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=925e1c0e-bf63-a244-df72-2f477d014666@redhat.com \
    --to=david@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=mihajlov@linux.ibm.com \
    --cc=pmorel@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).