qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: David Hildenbrand <david@redhat.com>,
	qemu-devel@nongnu.org, qemu-s390x@nongnu.org,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	Cornelia Huck <cohuck@redhat.com>,
	Harald Freudenberger <freude@linux.ibm.com>,
	Holger Dengler <dengler@linux.ibm.com>
Subject: Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions
Date: Fri, 23 Sep 2022 08:25:17 +0200	[thread overview]
Message-ID: <fd5e8081-5144-2b7e-de0e-1ce0f6cb11a3@redhat.com> (raw)
In-Reply-To: <CAHmME9pqFvYfat1yki86_x1k0A7x4eA0f9q=UeLaf+AOGV=Taw@mail.gmail.com>

On 22/09/2022 18.35, Jason A. Donenfeld wrote:
> On Thu, Sep 22, 2022 at 5:55 PM Thomas Huth <thuth@redhat.com> wrote:
>>
>> On 22/09/2022 17.38, David Hildenbrand wrote:
>>> From: "Jason A. Donenfeld" <Jason@zx2c4.com>
>>>
>>> In order to fully support MSA_EXT_5, we have to support the SHA-512
>>> special instructions. So implement those.
>>>
>>> The implementation began as something TweetNacl-like, and then was
>>> adjusted to be useful here. It's not very beautiful, but it is quite
>>> short and compact, which is what we're going for.
>> ...
>>> @@ -52,6 +278,9 @@ uint32_t HELPER(msa)(CPUS390XState *env, uint32_t r1, uint32_t r2, uint32_t r3,
>>>                cpu_stb_data_ra(env, param_addr, subfunc[i], ra);
>>>            }
>>>            break;
>>> +    case 3: /* CPACF_*_SHA_512 */
>>> +        return cpacf_sha512(env, ra, env->regs[1], &env->regs[r2],
>>> +                            &env->regs[r2 + 1], type);
>>
>> I have to say that I liked Jason's v8 better here. Code 3 is also used for
>> other instructions with completely different meaning, e.g. PCKMO uses 3 for
>> TDEA-192 ... so having the "type" check here made more sense.
>> (meta comment: maybe we should split up the msa function and stop using just
>> one function for all crypto/rng related instructions? ... but that's of
>> course something for a different patch series)
> 
> Maybe just commit my v8, and then David's changes can layer on top as
> follow ups? Checking len alignment, for example, is a separate patch
> from the rest.

Yes, let's do that now - that will also later help to distinguish who did 
what part of the code.

  Thomas



  reply	other threads:[~2022-09-23  6:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 10:07 [PATCH v8 1/2] target/s390x: support SHA-512 extensions Jason A. Donenfeld
2022-09-21 10:07 ` [PATCH v8 2/2] target/s390x: support PRNO_TRNG instruction Jason A. Donenfeld
2022-09-22 13:09   ` David Hildenbrand
2022-09-22 15:40   ` Thomas Huth
2022-09-26 15:11   ` Thomas Huth
2022-09-26 15:19     ` Jason A. Donenfeld
2022-09-22 13:07 ` [PATCH v8 1/2] target/s390x: support SHA-512 extensions David Hildenbrand
2022-09-22 14:35   ` Jason A. Donenfeld
2022-09-22 14:51     ` David Hildenbrand
2022-09-22 15:11       ` David Hildenbrand
2022-09-22 15:36       ` Thomas Huth
2022-09-22 15:37         ` David Hildenbrand
2022-09-23 10:14   ` Alex Bennée
2022-09-22 15:38 ` [PATCH v8.1 " David Hildenbrand
2022-09-22 15:55   ` Thomas Huth
2022-09-22 16:35     ` Jason A. Donenfeld
2022-09-23  6:25       ` Thomas Huth [this message]
2022-09-22 17:18     ` David Hildenbrand
2022-09-23  6:23       ` Thomas Huth
2022-09-23  6:37         ` David Hildenbrand
2022-09-23  9:19           ` Jason A. Donenfeld
2022-09-23 10:47             ` David Hildenbrand
2022-09-23 11:19               ` Jason A. Donenfeld
2022-09-23 11:35                 ` David Hildenbrand
2022-09-23 11:46                   ` Jason A. Donenfeld
2022-09-23 12:05                     ` Thomas Huth
2022-09-23 12:07                       ` Jason A. Donenfeld
2022-09-23 12:45                         ` Thomas Huth
2022-09-23 12:13                     ` David Hildenbrand

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=fd5e8081-5144-2b7e-de0e-1ce0f6cb11a3@redhat.com \
    --to=thuth@redhat.com \
    --cc=Jason@zx2c4.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=dengler@linux.ibm.com \
    --cc=freude@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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).