Re: [RFC PATCH crypto] AES: Add support to Intel AES-NI instructions

2008-12-15 Thread Suresh Siddha
On Sun, Dec 14, 2008 at 07:38:42PM -0800, Herbert Xu wrote: > On Mon, Dec 15, 2008 at 10:19:02AM +0800, Huang Ying wrote: > > > > The general x86 implementation is used as the fall back for new AES-NI > > based implementation. Because AES-NI can not be used in kernel soft_irq > > context. If crypto

Re: [RFC PATCH crypto] AES: Add support to Intel AES-NI instructions

2008-12-15 Thread Herbert Xu
On Mon, Dec 15, 2008 at 04:21:06PM +1100, Herbert Xu wrote: > > > a. Do not touch SSE state in soft_irq > > b. Disable/restore soft_irq in kernel_fpu_begin/kernel_fpu_end > > c. Use a per-CPU data structure to save kernel FPU state during > > soft_irq. > > > > The mothod a is used in patch. > > C

Re: [RFC PATCH crypto] AES: Add support to Intel AES-NI instructions

2008-12-15 Thread Herbert Xu
On Mon, Dec 15, 2008 at 10:07:45AM +0100, Sebastian Andrzej Siewior wrote: > > You have to it if you want to bypass the crypto layer and call asm > functions directly and I'm not sure whether bypassing the crypto layer > is a good thing. Both asm routines (the 32bit and 64bit) assume that > keylen

Re: [RFC PATCH crypto] AES: Add support to Intel AES-NI instructions

2008-12-15 Thread Sebastian Andrzej Siewior
* Huang Ying | 2008-12-15 10:19:02 [+0800]: >> Nice work. A few things: >> - Did you rename the "old" x86 functions to avoid a clash? >> So you bypass the crypto layer in case you can't handle the operation. >> Does this improve the performace or just saves key strokes? Not sure >> what the