From patchwork Fri Mar 15 10:44:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 10854475 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6336E15AC for ; Fri, 15 Mar 2019 10:46:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A7922A934 for ; Fri, 15 Mar 2019 10:46:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EC602A937; Fri, 15 Mar 2019 10:46:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D0A7B2A934 for ; Fri, 15 Mar 2019 10:46:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1h4kKh-00052u-Bz; Fri, 15 Mar 2019 10:44:59 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1h4kKg-00052d-4f for xen-devel@lists.xenproject.org; Fri, 15 Mar 2019 10:44:58 +0000 X-Inumbo-ID: 5f0e27b6-470f-11e9-9848-bb533d287e20 Received: from prv1-mh.provo.novell.com (unknown [137.65.248.33]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 5f0e27b6-470f-11e9-9848-bb533d287e20; Fri, 15 Mar 2019 10:44:56 +0000 (UTC) Received: from INET-PRV1-MTA by prv1-mh.provo.novell.com with Novell_GroupWise; Fri, 15 Mar 2019 04:44:55 -0600 Message-Id: <5C8B8228020000780021F176@prv1-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 18.1.0 Date: Fri, 15 Mar 2019 04:44:56 -0600 From: "Jan Beulich" To: "xen-devel" References: <5B6BF83602000078001DC548@prv1-mh.provo.novell.com> <5C8B7EC0020000780021F10B@prv1-mh.provo.novell.com> In-Reply-To: <5C8B7EC0020000780021F10B@prv1-mh.provo.novell.com> Mime-Version: 1.0 Content-Disposition: inline Subject: [Xen-devel] [PATCH v8 15/50] x86emul: support AVX512F move high/low insns X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: George Dunlap , Andrew Cooper , Wei Liu , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP No explicit test harness additions other than the overrides, as the compiler already makes use of the insns. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- v8: No need to set fault_suppression to false. v4: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -253,6 +253,16 @@ static const struct test avx512f_128[] = INSN(insertps, 66, 0f3a, 21, el, d, el), INSN(mov, 66, 0f, 6e, el, dq64, el), INSN(mov, 66, 0f, 7e, el, dq64, el), +// movhlps, , 0f, 12, d + INSN(movhpd, 66, 0f, 16, el, q, vl), + INSN(movhpd, 66, 0f, 17, el, q, vl), + INSN(movhps, , 0f, 16, el_2, d, vl), + INSN(movhps, , 0f, 17, el_2, d, vl), +// movlhps, , 0f, 16, d + INSN(movlpd, 66, 0f, 12, el, q, vl), + INSN(movlpd, 66, 0f, 13, el, q, vl), + INSN(movlps, , 0f, 12, el_2, d, vl), + INSN(movlps, , 0f, 13, el_2, d, vl), INSN(movq, f3, 0f, 7e, el, q, el), INSN(movq, 66, 0f, d6, el, q, el), }; --- a/tools/tests/x86_emulator/simd.h +++ b/tools/tests/x86_emulator/simd.h @@ -266,6 +266,12 @@ OVR(movd); OVR(movq); OVR_SFP(mov); OVR_VFP(mova); +OVR(movhlps); +OVR(movhpd); +OVR(movhps); +OVR(movlhps); +OVR(movlpd); +OVR(movlps); OVR_VFP(movnt); OVR_VFP(movu); OVR_FP(mul); --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -286,11 +286,11 @@ static const struct twobyte_table { [0x0f] = { ModRM|SrcImmByte }, [0x10] = { DstImplicit|SrcMem|ModRM|Mov, simd_any_fp, d8s_vl }, [0x11] = { DstMem|SrcImplicit|ModRM|Mov, simd_any_fp, d8s_vl }, - [0x12] = { DstImplicit|SrcMem|ModRM|Mov, simd_other }, - [0x13] = { DstMem|SrcImplicit|ModRM|Mov, simd_other }, + [0x12] = { DstImplicit|SrcMem|ModRM|Mov, simd_other, 3 }, + [0x13] = { DstMem|SrcImplicit|ModRM|Mov, simd_other, 3 }, [0x14 ... 0x15] = { DstImplicit|SrcMem|ModRM, simd_packed_fp, d8s_vl }, - [0x16] = { DstImplicit|SrcMem|ModRM|Mov, simd_other }, - [0x17] = { DstMem|SrcImplicit|ModRM|Mov, simd_other }, + [0x16] = { DstImplicit|SrcMem|ModRM|Mov, simd_other, 3 }, + [0x17] = { DstMem|SrcImplicit|ModRM|Mov, simd_other, 3 }, [0x18 ... 0x1f] = { ImplicitOps|ModRM }, [0x20 ... 0x21] = { DstMem|SrcImplicit|ModRM }, [0x22 ... 0x23] = { DstImplicit|SrcMem|ModRM }, @@ -6032,6 +6032,25 @@ x86_emulate( op_bytes = 8; goto simd_0f_fp; + case X86EMUL_OPC_EVEX_66(0x0f, 0x12): /* vmovlpd m64,xmm,xmm */ + CASE_SIMD_PACKED_FP(_EVEX, 0x0f, 0x13): /* vmovlp{s,d} xmm,m64 */ + case X86EMUL_OPC_EVEX_66(0x0f, 0x16): /* vmovhpd m64,xmm,xmm */ + CASE_SIMD_PACKED_FP(_EVEX, 0x0f, 0x17): /* vmovhp{s,d} xmm,m64 */ + generate_exception_if(ea.type != OP_MEM, EXC_UD); + /* fall through */ + case X86EMUL_OPC_EVEX(0x0f, 0x12): /* vmovlps m64,xmm,xmm */ + /* vmovhlps xmm,xmm,xmm */ + case X86EMUL_OPC_EVEX(0x0f, 0x16): /* vmovhps m64,xmm,xmm */ + /* vmovlhps xmm,xmm,xmm */ + generate_exception_if((evex.lr || evex.opmsk || evex.brs || + evex.w != (evex.pfx & VEX_PREFIX_DOUBLE_MASK)), + EXC_UD); + host_and_vcpu_must_have(avx512f); + if ( (d & DstMask) != DstMem ) + d &= ~TwoOp; + op_bytes = 8; + goto simd_zmm; + case X86EMUL_OPC_F3(0x0f, 0x12): /* movsldup xmm/m128,xmm */ case X86EMUL_OPC_VEX_F3(0x0f, 0x12): /* vmovsldup {x,y}mm/mem,{x,y}mm */ case X86EMUL_OPC_F2(0x0f, 0x12): /* movddup xmm/m64,xmm */