From 66a9aa12e70a1479d5b7f202539093adb94e7b31 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 21 Jul 2026 09:48:04 +0200 Subject: [PATCH] x86emul: prune an excess EVEX.Z check DstMem processing early in x86_emulate() raises #UD when EVEX.Z is set with a memory destination. Open-coded checks like this one are therefore dead / unreachable code, violating Misra rules. Fixes: 4037a62ef93e ("x86emul: support AVX512F floating-point conversion insns") Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- xen/arch/x86/x86_emulate/x86_emulate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index 38e5c349f5..a4ba22ffb5 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -7350,7 +7350,7 @@ x86_emulate( if ( evex_encoded() ) { generate_exception_if((evex.w || evex.reg != 0xf || !evex.RX || - (ea.type != OP_REG && (evex.z || evex.brs))), + (ea.type != OP_REG && evex.brs)), X86_EXC_UD); host_and_vcpu_must_have(avx512f); avx512_vlen_check(false);