diff mbox series

x86emul: always set operand size for AVX-VNNI-INT8 insns

Message ID 49bcdcf1-4d9c-4126-83a8-9a7d3a7bc49f@suse.com (mailing list archive)
State New
Headers show
Series x86emul: always set operand size for AVX-VNNI-INT8 insns | expand

Commit Message

Jan Beulich Aug. 21, 2024, 9:26 a.m. UTC
Unlike for AVX-VNNI-INT16 I missed to notice that op_bytes may still be
zero when reaching the respective case block: With the ext0f38_table[]
entries having simd_packed_int, the defaulting at the bottom of
x86emul_decode() won't set the field to non-zero for F3- or F2-prefixed
insns.

Fixes: 842acaa743a5 ("x86emul: support AVX-VNNI-INT8")
Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Andrew Cooper Aug. 21, 2024, 9:29 a.m. UTC | #1
On 21/08/2024 10:26 am, Jan Beulich wrote:
> Unlike for AVX-VNNI-INT16 I missed to notice that op_bytes may still be

Minor grammar note.  It's either "I missed that", or "I failed to notice
that".

> zero when reaching the respective case block: With the ext0f38_table[]
> entries having simd_packed_int, the defaulting at the bottom of
> x86emul_decode() won't set the field to non-zero for F3- or F2-prefixed
> insns.
>
> Fixes: 842acaa743a5 ("x86emul: support AVX-VNNI-INT8")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff mbox series

Patch

--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -6075,6 +6075,7 @@  x86_emulate(
     case X86EMUL_OPC_VEX_F2(0x0f38, 0x51): /* vpdpbssds [xy]mm/mem,[xy]mm,[xy]mm */
         host_and_vcpu_must_have(avx_vnni_int8);
         generate_exception_if(vex.w, X86_EXC_UD);
+        op_bytes = 16 << vex.l;
         goto simd_0f_ymm;
 
     case X86EMUL_OPC_VEX_66(0x0f38, 0x50): /* vpdpbusd [xy]mm/mem,[xy]mm,[xy]mm */