All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	qemu-devel@nongnu.org, peter.maydell@linaro.org
Cc: christoffer.dall@linaro.org
Subject: Re: [Qemu-devel] [PATCH] target-arm: add support for v8 SHA1 and SHA256 instructions
Date: Tue, 25 Mar 2014 17:46:24 +0100	[thread overview]
Message-ID: <5331B2E0.3090902@suse.de> (raw)
In-Reply-To: <1395764877-10487-1-git-send-email-ard.biesheuvel@linaro.org>

Am 25.03.2014 17:27, schrieb Ard Biesheuvel:
> This adds support for the SHA1 and SHA256 instructions that are available
> on some v8 implementations of Aarch32.
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  target-arm/cpu.c           |   2 +
>  target-arm/cpu.h           |   2 +
>  target-arm/crypto_helper.c | 257 +++++++++++++++++++++++++++++++++++++++++++--
>  target-arm/helper.h        |   9 ++
>  target-arm/translate.c     |  81 ++++++++++++++
>  5 files changed, 344 insertions(+), 7 deletions(-)
> 
> diff --git a/target-arm/cpu.c b/target-arm/cpu.c
> index c32d8c4855b4..58c4584ac3bc 100644
> --- a/target-arm/cpu.c
> +++ b/target-arm/cpu.c
> @@ -291,6 +291,8 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
>          set_feature(env, ARM_FEATURE_ARM_DIV);
>          set_feature(env, ARM_FEATURE_LPAE);
>          set_feature(env, ARM_FEATURE_V8_AES);
> +        set_feature(env, ARM_FEATURE_V8_SHA1);
> +        set_feature(env, ARM_FEATURE_V8_SHA256);
>      }
>      if (arm_feature(env, ARM_FEATURE_V7)) {
>          set_feature(env, ARM_FEATURE_VAPA);
> diff --git a/target-arm/cpu.h b/target-arm/cpu.h
> index bf37cd60d0a2..f5039d8b0177 100644
> --- a/target-arm/cpu.h
> +++ b/target-arm/cpu.h
> @@ -630,6 +630,8 @@ enum arm_features {
>      ARM_FEATURE_V8_AES, /* implements AES part of v8 Crypto Extensions */
>      ARM_FEATURE_CBAR, /* has cp15 CBAR */
>      ARM_FEATURE_CRC, /* ARMv8 CRC instructions */
> +    ARM_FEATURE_V8_SHA1, /* implements SHA1 part of v8 Crypto Extensions */
> +    ARM_FEATURE_V8_SHA256, /* implements SHA256 part of v8 Crypto Extensions */
>  };

Do these really need to be separate features? We only have 32 feature
bits. Maybe even an ARM_FEATURE_CRYPTO for AES, SHA1, SHA256 would do?

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2014-03-25 16:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-25 16:27 [Qemu-devel] [PATCH] target-arm: add support for v8 SHA1 and SHA256 instructions Ard Biesheuvel
2014-03-25 16:46 ` Andreas Färber [this message]
2014-03-25 17:18   ` Peter Maydell
2014-03-25 17:22     ` Peter Maydell

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=5331B2E0.3090902@suse.de \
    --to=afaerber@suse.de \
    --cc=ard.biesheuvel@linaro.org \
    --cc=christoffer.dall@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.