public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Huang Ying <ying.huang@intel.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org
Subject: Re: [PATCH] crypto: Add AES-NI accelerated CTR mode
Date: Thu, 11 Mar 2010 12:15:10 -0800	[thread overview]
Message-ID: <20100311121510.80a16ec4.akpm@linux-foundation.org> (raw)
In-Reply-To: <1267424076.1640.82.camel@yhuang-dev.sh.intel.com>

On Mon, 01 Mar 2010 14:14:36 +0800
Huang Ying <ying.huang@intel.com> wrote:

> To take advantage of the hardware pipeline implementation of AES-NI
> instructions. CTR mode cryption is implemented in ASM to schedule
> multiple AES-NI instructions one after another. This way, some latency
> of AES-NI instruction can be eliminated.
> 
> Performance testing based on dm-crypt should 50% reduction of
> ecryption/decryption time.
> 
> ...
>
> +/*
> + * _aesni_inc_init:	internal ABI
> + *	setup registers used by _aesni_inc
> + * input:
> + *	IV
> + * output:
> + *	CTR:	== IV, in little endian
> + *	TCTR_LOW: == lower qword of CTR
> + *	INC:	== 1, in little endian
> + *	BSWAP_MASK == endian swapping mask
> + */
> +_aesni_inc_init:
> +	movaps .Lbswap_mask, BSWAP_MASK
> +	movaps IV, CTR
> +	PSHUFB_XMM BSWAP_MASK CTR
> +	mov $1, TCTR_LOW
> +	movq TCTR_LOW, INC
> +	movq CTR, TCTR_LOW

^^ these two lines don't assemble with gas 2.16.1:

arch/x86/crypto/aesni-intel_asm.S: Assembler messages:
arch/x86/crypto/aesni-intel_asm.S:752: Error: suffix or operands invalid for `movq'
arch/x86/crypto/aesni-intel_asm.S:753: Error: suffix or operands invalid for `movq'

> +	ret


  parent reply	other threads:[~2010-03-11 20:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-01  6:14 [PATCH] crypto: Add AES-NI accelerated CTR mode Huang Ying
2010-03-10 10:29 ` Herbert Xu
2010-03-11 20:15 ` Andrew Morton [this message]
2010-03-12  0:19   ` Herbert Xu

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=20100311121510.80a16ec4.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ying.huang@intel.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