From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Teddy Astie" <teddy.astie@vates.tech>,
"Roger Pau Monné" <roger@xenproject.org>
Subject: [PATCH v5 12/19] x86emul: support AVX10.2 media insns
Date: Wed, 11 Nov 2026 14:47:02 +0100 [thread overview]
Message-ID: <8a48acdc-fb68-4e34-a412-7387d9832996@suse.com> (raw)
In-Reply-To: <1be43887-4494-4ff5-a801-0c6bab90c80d@suse.com>
These are all very similar to various existing insns.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
SDE: -dmr / -future
---
In evex-disp8.c, should we separately have avx10_v1_aux_all[]? If so, all
the convert insns would also need moving/copying there.
---
v4: Series re-ordering adjustments. Update to spec version 6.
v3: New.
--- a/tools/tests/x86_emulator/evex-disp8.c
+++ b/tools/tests/x86_emulator/evex-disp8.c
@@ -725,6 +725,20 @@ static const struct test avx10_2_all[] =
INSN(comisbf16, 66, map5, 2f, el, bf16, el),
INSN_SFP(comx, 0f, 2f),
INSN(comxsh, f3, map5, 2f, el, fp16, el),
+ INSN(dpphps, , 0f38, 52, vl, d, vl),
+ INSN(mpsadbw, f3, 0f3a, 42, vl, d_nb, vl),
+ INSN(pdpbssd, f2, 0f38, 50, vl, d, vl),
+ INSN(pdpbssds, f2, 0f38, 51, vl, d, vl),
+ INSN(pdpbsud, f3, 0f38, 50, vl, d, vl),
+ INSN(pdpbsuds, f3, 0f38, 51, vl, d, vl),
+ INSN(pdpbuud, , 0f38, 50, vl, d, vl),
+ INSN(pdpbuuds, , 0f38, 51, vl, d, vl),
+ INSN(pdpwsud, f3, 0f38, d2, vl, d, vl),
+ INSN(pdpwsuds, f3, 0f38, d3, vl, d, vl),
+ INSN(pdpwusd, 66, 0f38, d2, vl, d, vl),
+ INSN(pdpwusds, 66, 0f38, d3, vl, d, vl),
+ INSN(pdpwuud, , 0f38, d2, vl, d, vl),
+ INSN(pdpwuuds, , 0f38, d3, vl, d, vl),
INSN_SFP(ucomx, 0f, 2e),
INSN(ucomxsh, f3, map5, 2e, el, fp16, el),
};
--- a/tools/tests/x86_emulator/predicates.c
+++ b/tools/tests/x86_emulator/predicates.c
@@ -1927,8 +1927,15 @@ static const struct evex {
{ { 0x4d }, 2, T, R, pfx_66, Wn, LIG }, /* vrcp14s{s,d} */
{ { 0x4e }, 2, T, R, pfx_66, Wn, Ln }, /* vrsqrt14p{s,d} */
{ { 0x4f }, 2, T, R, pfx_66, Wn, LIG }, /* vrsqrt14s{s,d} */
+ { { 0x50 }, 2, T, R, pfx_no, W0, Ln }, /* vpdpbuud */
{ { 0x50 }, 2, T, R, pfx_66, W0, Ln }, /* vpdpbusd */
+ { { 0x50 }, 2, T, R, pfx_f3, W0, Ln }, /* vpdpbsud */
+ { { 0x50 }, 2, T, R, pfx_f2, W0, Ln }, /* vpdpbssd */
+ { { 0x51 }, 2, T, R, pfx_no, W0, Ln }, /* vpdpbuuds */
{ { 0x51 }, 2, T, R, pfx_66, W0, Ln }, /* vpdpbusds */
+ { { 0x51 }, 2, T, R, pfx_f3, W0, Ln }, /* vpdpbsuds */
+ { { 0x51 }, 2, T, R, pfx_f2, W0, Ln }, /* vpdpbssds */
+ { { 0x52 }, 2, T, R, pfx_no, W0, Ln }, /* vdpphps */
{ { 0x52 }, 2, T, R, pfx_66, W0, Ln }, /* vpdpwssd */
{ { 0x52 }, 2, T, R, pfx_f3, W0, Ln }, /* vdpbf16ps */
{ { 0x52 }, 2, T, R, pfx_f2, W0, L2 }, /* vp4dpwssd */
@@ -2029,6 +2036,12 @@ static const struct evex {
{ { 0xcc }, 2, T, R, pfx_66, Wn, L2 }, /* vrsqrt28p{s,d} */
{ { 0xcd }, 2, T, R, pfx_66, Wn, LIG }, /* vrsqrt28s{s,d} */
{ { 0xcf }, 2, T, R, pfx_66, W0, Ln }, /* vgf2p8mulb */
+ { { 0xd2 }, 2, T, R, pfx_no, W0, Ln }, /* vpdpwuud */
+ { { 0xd2 }, 2, T, R, pfx_66, W0, Ln }, /* vpdpwusd */
+ { { 0xd2 }, 2, T, R, pfx_f3, W0, Ln }, /* vpdpwsud */
+ { { 0xd3 }, 2, T, R, pfx_no, W0, Ln }, /* vpdpwuuds */
+ { { 0xd3 }, 2, T, R, pfx_66, W0, Ln }, /* vpdpwusds */
+ { { 0xd3 }, 2, T, R, pfx_f3, W0, Ln }, /* vpdpwsuds */
{ { 0xda }, 2, T, R, pfx_f3, W0, Ln }, /* vsm4key4 */
{ { 0xda }, 2, T, R, pfx_f2, W0, Ln }, /* vsm4rnds4 */
{ { 0xdc }, 2, T, R, pfx_66, WIG, Ln }, /* vaesenc */
@@ -2075,6 +2088,7 @@ static const struct evex {
{ { 0x3e }, 3, T, R, pfx_66, Wn, Ln }, /* vpcmpu{b,w} */
{ { 0x3f }, 3, T, R, pfx_66, Wn, Ln }, /* vpcmp{b,w} */
{ { 0x42 }, 3, T, R, pfx_66, W0, Ln }, /* vdbpsadbw */
+ { { 0x42 }, 3, T, R, pfx_f3, W0, Ln }, /* vmpsadbw */
{ { 0x43 }, 3, T, R, pfx_66, Wn, L1|L2 }, /* vshufi{32x4,64x2} */
{ { 0x44 }, 3, T, R, pfx_66, WIG, Ln }, /* vpclmulqdq */
{ { 0x50 }, 3, T, R, pfx_66, Wn, Ln }, /* vrangep{s,d} */
--- a/xen/arch/x86/x86_emulate/decode.c
+++ b/xen/arch/x86/x86_emulate/decode.c
@@ -434,8 +434,8 @@ static const struct ext0f38_table {
[0xcb] = { .simd_size = simd_other, .d8s = d8s_vl },
[0xcc ... 0xcd] = { .simd_size = simd_other, .two_op = 1, .d8s = d8s_vl },
[0xcf] = { .simd_size = simd_packed_int, .d8s = d8s_vl },
- [0xd2] = { .simd_size = simd_other },
- [0xd3] = { .simd_size = simd_other },
+ [0xd2] = { .simd_size = simd_other, .d8s = d8s_vl },
+ [0xd3] = { .simd_size = simd_other, .d8s = d8s_vl },
[0xd6] = { .simd_size = simd_other, .d8s = d8s_vl },
[0xd7] = { .simd_size = simd_scalar_vexw, .d8s = d8s_dq },
[0xda] = { .simd_size = simd_other, .d8s = d8s_vl },
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -6217,6 +6217,30 @@ x86_emulate(
avx512_vlen_check(true);
goto simd_zmm;
+ case X86EMUL_OPC_EVEX (0x0f38, 0x50): /* vpdpbuud [xyz]mm/mem,[xyz]mm,[xyz]mm{k} */
+ case X86EMUL_OPC_EVEX_F3(0x0f38, 0x50): /* vpdpbsud [xyz]mm/mem,[xyz]mm,[xyz]mm{k} */
+ case X86EMUL_OPC_EVEX_F2(0x0f38, 0x50): /* vpdpbssd [xyz]mm/mem,[xyz]mm,[xyz]mm{k} */
+ case X86EMUL_OPC_EVEX (0x0f38, 0x51): /* vpdpbuuds [xyz]mm/mem,[xyz]mm,[xyz]mm{k} */
+ case X86EMUL_OPC_EVEX_F3(0x0f38, 0x51): /* vpdpbsuds [xyz]mm/mem,[xyz]mm,[xyz]mm{k} */
+ case X86EMUL_OPC_EVEX_F2(0x0f38, 0x51): /* vpdpbssds [xyz]mm/mem,[xyz]mm,[xyz]mm{k} */
+ case X86EMUL_OPC_EVEX (0x0f38, 0xd2): /* vpdpwuud [xyz]mm/mem,[xyz]mm,[xyz]mm{k} */
+ case X86EMUL_OPC_EVEX_66(0x0f38, 0xd2): /* vpdpwusd [xyz]mm/mem,[xyz]mm,[xyz]mm{k} */
+ case X86EMUL_OPC_EVEX_F3(0x0f38, 0xd2): /* vpdpwsud [xyz]mm/mem,[xyz]mm,[xyz]mm{k} */
+ case X86EMUL_OPC_EVEX (0x0f38, 0xd3): /* vpdpwuuds [xyz]mm/mem,[xyz]mm,[xyz]mm{k} */
+ case X86EMUL_OPC_EVEX_66(0x0f38, 0xd3): /* vpdpwusds [xyz]mm/mem,[xyz]mm,[xyz]mm{k} */
+ case X86EMUL_OPC_EVEX_F3(0x0f38, 0xd3): /* vpdpwsuds [xyz]mm/mem,[xyz]mm,[xyz]mm{k} */
+ generate_exception_if(evex.w, X86_EXC_UD);
+ if ( !cp->avx10.avx10_v1_aux )
+ vcpu_must_have(avx10, 2);
+ op_bytes = 16 << evex.lr;
+ goto avx512f_no_sae;
+
+ case X86EMUL_OPC_EVEX (0x0f38, 0x52): /* vdpphps [xyz]mm/mem,[xyz]mm,[xyz]mm{k} */
+ generate_exception_if(evex.w, X86_EXC_UD);
+ vcpu_must_have(avx10, 2);
+ op_bytes = 16 << evex.lr;
+ goto avx512f_no_sae;
+
case X86EMUL_OPC_EVEX_66(0x0f38, 0x8f): /* vpshufbitqmb [xyz]mm/mem,[xyz]mm,k{k} */
generate_exception_if(evex.w || !evex.r || !evex.R || evex.z, X86_EXC_UD);
/* fall through */
@@ -7685,6 +7709,14 @@ x86_emulate(
visa_check(bw);
goto opmask_shift_imm;
+ case X86EMUL_OPC_EVEX_F3(0x0f3a, 0x42): /* vmpsadbw $imm8,[xyz]mm/mem,[xyz]mm,[xyz]mm{k} */
+ generate_exception_if(evex.w || evex.brs, X86_EXC_UD);
+ vcpu_must_have(avx10, 2);
+ avx512_vlen_check(false);
+ op_bytes = 16 << evex.lr;
+ fault_suppression = false;
+ goto simd_imm8_zmm;
+
case X86EMUL_OPC_66(0x0f3a, 0x44): /* pclmulqdq $imm8,xmm/m128,xmm */
case X86EMUL_OPC_VEX_66(0x0f3a, 0x44): /* vpclmulqdq $imm8,{x,y}mm/mem,{x,y}mm,{x,y}mm */
vcpu_must_have(pclmulqdq);
next prev parent reply other threads:[~2026-11-11 13:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 13:40 [PATCH v5 00/19] x86: support AVX10 Jan Beulich
2026-11-11 13:41 ` [PATCH v5 01/19] x86/CPUID: enable AVX10 leaf Jan Beulich
2026-11-11 13:42 ` [PATCH v5 02/19] x86emul: support SIMD MOVRS Jan Beulich
2026-11-11 13:42 ` [PATCH v5 03/19] x86emul: support AVX10 forms of SM4 insns Jan Beulich
2026-11-11 13:42 ` [PATCH v5 04/19] x86emul: support AVX10.1 Jan Beulich
2026-11-11 13:43 ` [PATCH v5 05/19] x86emul/test: use simd_check_avx512*() in main() Jan Beulich
2026-11-11 13:44 ` [PATCH v5 06/19] x86emul/test: drop cpu_has_avx512vl Jan Beulich
2026-11-11 13:44 ` [PATCH v5 07/19] x86emul: AVX10.1 testing Jan Beulich
2026-11-11 13:45 ` [PATCH v5 08/19] x86emul/test: engage AVX512VL via command line option Jan Beulich
2026-11-11 13:45 ` [PATCH v5 09/19] x86/CPUID: enable AVX10.2 sub-leaf Jan Beulich
2026-11-11 13:46 ` [PATCH v5 10/19] x86emul: support AVX10.2 scalar compare insns Jan Beulich
2026-11-11 13:46 ` [PATCH v5 11/19] x86emul: support AVX10.2 partial copy insns Jan Beulich
2026-11-11 13:47 ` Jan Beulich [this message]
2026-11-11 13:47 ` [PATCH v5 13/19] x86emul: support AVX10.2 minmax insns Jan Beulich
2026-11-11 13:47 ` [PATCH v5 14/19] x86emul: support AVX10.2 BFloat16 insns Jan Beulich
2026-11-11 13:48 ` [PATCH v5 15/19] x86emul: support AVX10.2 saturating convert insns Jan Beulich
2026-11-11 13:48 ` [PATCH v5 16/19] x86emul: support other AVX10.2 " Jan Beulich
2026-11-11 13:48 ` [PATCH v5 17/19] x86emul: support AVX10.2-aux misc insns Jan Beulich
2026-11-11 13:49 ` [PATCH v5 18/19] x86emul: support AVX10.2-aux {B,H}F{4,6} <-> {B,H}F8 converts Jan Beulich
2026-11-11 13:49 ` [PATCH v5 19/19] x86emul: support AVX10.2-aux PS <-> {B,H}F8{,S} converts Jan Beulich
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=8a48acdc-fb68-4e34-a412-7387d9832996@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=roger@xenproject.org \
--cc=teddy.astie@vates.tech \
--cc=xen-devel@lists.xenproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.