[PATCH v1 0/3] SHA256 for PPC/SPE
Markus Stockhausen
stockhausen at collogia.de
Mon Jan 26 16:19:48 AEDT 2015
> Von: linux-crypto-owner at vger.kernel.org [linux-crypto-owner at vger.kernel.org]" im Auftrag von "Herbert Xu [herbert at gondor.apana.org.au]
> Gesendet: Montag, 26. Januar 2015 01:18
> An: Markus Stockhausen
> Cc: linux-crypto at vger.kernel.org; linuxppc-dev at lists.ozlabs.org
> Betreff: Re: [PATCH v1 0/3] SHA256 for PPC/SPE
>
> Markus Stockhausen <stockhausen at collogia.de> wrote:
> >
> > [PATCH v1 0/3] SHA256 for PPC/SPE
> >
> > The following patches add support for SIMD accelerated SHA256
> > calculation on PPC processors with SPE instruction set. The
> > implementation takes care of the following constraints:
> >
> > - independant of processor endianess
> > - fallback to generic code if called from interrupt context
> > - disable preemtion only for short intervals
>
> Thanks for the patch! Unfortunately the interrupt context test
> is a bummer because that means your code won't be used by IPsec
> at all.
>
> Would it be possible to relax the conditions similar to sha1_ssse3
> on x86? If not how about going async with cryptd?
@Herbert: thanks for that annotation. IPsec is the desired use case.
Do you have a programming template for the cryptd integration?
E.g. ghash-clmulni-intel_glue.c?
@linuxppc: Intel world checks for usable FPU (SSE3, ...) in the crypto
modules with
bool irq_fpu_usable(void)
{
return !in_interrupt() ||
interrupted_user_mode() ||
interrupted_kernel_fpu_idle();
}
I guess interrupted_kernel_fpu_idle() is the part that allows IPsec
inside an interrupt to make use of the accelerated module.
Explanation reads:
* On others, we can do a kernel_fpu_begin/end() pair *ONLY* if
* that pair does nothing at all: the thread must not have fpu (so
* that we don't try to save the FPU state), and TS must
* be set (so that the clts/stts pair does nothing that is
* visible in the interrupted kernel thread).
Do I have the chance to use something similiar in the PPC/SPE
case? Or is there a simple way like saving the SPE registers
myself?
Thanks in advance.
Markus
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: InterScan_Disclaimer.txt
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20150126/eb50cca8/attachment.txt>
More information about the Linuxppc-dev
mailing list