From: Jan Beulich Date: Tue, 21 Jan 2025 08:27:45 +0000 (+0100) Subject: x86emul: correct #UD check for AVX512-FP16 complex multiplications X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4c894c519db69c912d57a122f717ac3d6c81254c;p=xen.git x86emul: correct #UD check for AVX512-FP16 complex multiplications 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 Acked-by: Andrew Cooper master commit: a30d438ce58b70c5955f5d37f776086ab8f88623 master date: 2024-08-19 15:32:31 +0200 --- diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index 2c6bc8df2c..85d8ea7172 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -7948,8 +7948,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; }