[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging-4.9] x86emul: work around SandyBridge errata



commit 8b799b1b33a792c896ee2363d7217607051549f4
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Feb 1 12:05:42 2019 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Feb 1 12:05:42 2019 +0100

    x86emul: work around SandyBridge errata
    
    There are a number of exception condition related errata on SandyBridge
    CPUs, some of which are unexpected #UD (others, of no interest here, are
    lack of mandated exceptions, or exceptions of unexpected type). Annotate
    the one workaround we already have, and add two more.
    
    Due to the exception recovery we have in place for stub invocations
    these aren't security issues.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    master commit: 0d4d9e8f55602415475e04a5dc8b4ad27845a7f9
    master date: 2018-12-18 15:19:47 +0100
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c 
b/xen/arch/x86/x86_emulate/x86_emulate.c
index e2a1b1935a..eb3793bd9a 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -5624,9 +5624,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);
@@ -6319,6 +6321,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;
@@ -7521,6 +7526,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;
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.9

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.