]> xenbits.xensource.com Git - xen.git/commitdiff
x86emul: correct #UD check for AVX512-FP16 complex multiplications
authorJan Beulich <jbeulich@suse.com>
Tue, 24 Sep 2024 12:30:04 +0000 (14:30 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 24 Sep 2024 12:30:04 +0000 (14:30 +0200)
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>
master commit: a30d438ce58b70c5955f5d37f776086ab8f88623
master date: 2024-08-19 15:32:31 +0200

xen/arch/x86/x86_emulate/x86_emulate.c

index 2d5c1de8ecc282eaeb0e264afda1f2360d87f2e1..16557385bf354e9cc662372780623b2a529872d2 100644 (file)
@@ -7984,8 +7984,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;
     }