[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 3/4] x86emul: Support vaes insns



>>> On 03.01.18 at 09:26, <yang.zhong@xxxxxxxxx> wrote:
> The previous aes insns only support legacy and AVX128.
> Icelake added AVX256 support.

Same remark here as for the pclmulqdq patch.

> Signed-off-by: Yang Zhong <yang.zhong@xxxxxxxxx>
> ---

Please provide a brief list of changes at this spot in each patch.

> @@ -7336,17 +7337,23 @@ x86_emulate(
>      case X86EMUL_OPC_66(0x0f38, 0xdb):     /* aesimc xmm/m128,xmm */
>      case X86EMUL_OPC_VEX_66(0x0f38, 0xdb): /* vaesimc xmm/m128,xmm */
>      case X86EMUL_OPC_66(0x0f38, 0xdc):     /* aesenc xmm/m128,xmm,xmm */
> -    case X86EMUL_OPC_VEX_66(0x0f38, 0xdc): /* vaesenc xmm/m128,xmm,xmm */
> +    case X86EMUL_OPC_VEX_66(0x0f38, 0xdc): /* vaesenc 
> {x,y}mm/mem,{x,y}mm,{x,y}mm */
>      case X86EMUL_OPC_66(0x0f38, 0xdd):     /* aesenclast xmm/m128,xmm,xmm */
> -    case X86EMUL_OPC_VEX_66(0x0f38, 0xdd): /* vaesenclast xmm/m128,xmm,xmm */
> +    case X86EMUL_OPC_VEX_66(0x0f38, 0xdd): /* vaesenclast 
> {x,y}mm/mem,{x,y}mm,{x,y}mm */
>      case X86EMUL_OPC_66(0x0f38, 0xde):     /* aesdec xmm/m128,xmm,xmm */
> -    case X86EMUL_OPC_VEX_66(0x0f38, 0xde): /* vaesdec xmm/m128,xmm,xmm */
> +    case X86EMUL_OPC_VEX_66(0x0f38, 0xde): /* vaesdec 
> {x,y}mm/mem,{x,y}mm,{x,y}mm */
>      case X86EMUL_OPC_66(0x0f38, 0xdf):     /* aesdeclast xmm/m128,xmm,xmm */
> -    case X86EMUL_OPC_VEX_66(0x0f38, 0xdf): /* vaesdeclast xmm/m128,xmm,xmm */
> +    case X86EMUL_OPC_VEX_66(0x0f38, 0xdf): /* vaesdeclast 
> {x,y}mm/mem,{x,y}mm,{x,y}mm */
> +        if ( vex.l )
> +        {
> +            host_and_vcpu_must_have(vaes);
> +            goto simd_0f_ymm;
> +        }
>          host_and_vcpu_must_have(aesni);
>          if ( vex.opcx == vex_none )
>              goto simd_0f38_common;
> -        /* fall through */
> +        goto simd_0f_avx;
> +
>      case X86EMUL_OPC_VEX_66(0x0f38, 0x41): /* vphminposuw xmm/m128,xmm,xmm */

Hmm, you've reacted to my v3 comments, but you didn't really address
them: VAESIMC still is mishandled with the code above. Note that I didn't
say "remove the fall-through", but instead "move out the block no longer
wanting this fall-through".

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.