[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions
From: |
Jason A. Donenfeld |
Subject: |
Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions |
Date: |
Thu, 22 Sep 2022 18:35:53 +0200 |
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.
Jason
[PATCH v8.1 1/2] target/s390x: support SHA-512 extensions, David Hildenbrand, 2022/09/22
- Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions, Thomas Huth, 2022/09/22
- Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions, David Hildenbrand, 2022/09/22
- Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions, Thomas Huth, 2022/09/23
- Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions, David Hildenbrand, 2022/09/23
- Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions, Jason A. Donenfeld, 2022/09/23
- Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions, David Hildenbrand, 2022/09/23
- Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions, Jason A. Donenfeld, 2022/09/23
- Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions, David Hildenbrand, 2022/09/23
- Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions, Jason A. Donenfeld, 2022/09/23
- Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions, Thomas Huth, 2022/09/23