diff mbox series

x86emul: correct #UD check for AVX512-FP16 complex multiplications

Message ID 7702a8a6-bd83-4390-bd02-cae77c763560@suse.com (mailing list archive)
State New
Headers show
Series x86emul: correct #UD check for AVX512-FP16 complex multiplications | expand

Commit Message

Jan Beulich Aug. 15, 2024, 9:17 a.m. UTC
avx512_vlen_check()'s argument was inverted, while the surrounding
conditional wrongly forced the EVEX.L'L check for the scalar forms when
embedded rounding was in effect.

Fixes: d14c52cba0f5 ("x86emul: handle AVX512-FP16 complex multiplication insns")
Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Andrew Cooper Aug. 15, 2024, 9:43 a.m. UTC | #1
On 15/08/2024 10:17 am, Jan Beulich wrote:
> avx512_vlen_check()'s argument was inverted, while the surrounding
> conditional wrongly forced the EVEX.L'L check for the scalar forms when
> embedded rounding was in effect.
>
> Fixes: d14c52cba0f5 ("x86emul: handle AVX512-FP16 complex multiplication insns")
> 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
@@ -7852,8 +7852,8 @@  x86_emulate(
         generate_exception_if(modrm_reg == src1 ||
                               (ea.type != OP_MEM && modrm_reg == modrm_rm),
                               X86_EXC_UD);
-        if ( ea.type != OP_REG || (b & 1) || !evex.brs )
-            avx512_vlen_check(!(b & 1));
+        if ( ea.type != OP_REG || !evex.brs )
+            avx512_vlen_check(b & 1);
         goto simd_zmm;
     }