From: Jan Beulich <jbeulich@suse.com>
Subject: x86emul: add get_fpu() to VCVTPS2PH handling

Like all other SIMD insns being emulated, we of course need to invoke
get_fpu() in accordance with the extended states in use.

This is CVE-2026-142563 / XSA-542.

Fixes: 0af0e7648526 ("x86emul: support F16C insns")
Fixes: 4037a62ef93e ("x86emul: support AVX512F floating-point conversion insns")
Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reported-by: Roger Pau Monné <roger.pau@amd.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -10787,12 +10787,14 @@ x86_emulate(
                                   EXC_UD);
             host_and_vcpu_must_have(avx512f);
             avx512_vlen_check(false);
+            get_fpu(X86EMUL_FPU_zmm);
             opc = init_evex(stub);
         }
         else
         {
             generate_exception_if(vex.w || vex.reg != 0xf, EXC_UD);
             host_and_vcpu_must_have(f16c);
+            get_fpu(X86EMUL_FPU_ymm);
             opc = init_prefixes(stub);
         }
 
