diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index 2a4a98d0b5..003c4fba7c 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -5647,9 +5647,11 @@ x86_emulate( else { generate_exception_if(vex.reg != 0xf, EXC_UD); - vex.l = 0; host_and_vcpu_must_have(avx); get_fpu(X86EMUL_FPU_ymm, &fic); + + /* Work around erratum BT230. */ + vex.l = 0; } opc = init_prefixes(stub); @@ -6337,6 +6339,9 @@ x86_emulate( get_fpu(X86EMUL_FPU_mmx, &fic); } + /* Work around erratum BT36. */ + vex.w = 0; + opc = init_prefixes(stub); opc[0] = b; fic.insn_bytes = PFX_BYTES + 1; @@ -7630,6 +7635,11 @@ x86_emulate( generate_exception_if(vex.l || vex.reg != 0xf, EXC_UD); host_and_vcpu_must_have(avx); get_fpu(X86EMUL_FPU_ymm, &fic); + + /* Work around erratum BT41. */ + if ( !mode_64bit() ) + vex.w = 0; + opc = init_prefixes(stub); goto pextr;