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

[Xen-changelog] [xen stable-4.2] x86/AMD: work around erratum 793 for 32-bit



commit a8e4004c5a164914bdf36f7ef3efa088846bf2b5
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Feb 20 08:38:43 2014 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Feb 20 08:38:43 2014 +0100

    x86/AMD: work around erratum 793 for 32-bit
    
    The original change went into a 64-bit only code section, thus leaving
    the issue unfixed on 32-bit. Re-order code to address this.
    
    This is part of CVE-2013-6885 / XSA-82.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
---
 xen/arch/x86/cpu/amd.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index 3bb2dbd..0e2822f 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -522,6 +522,18 @@ static void __devinit init_amd(struct cpuinfo_x86 *c)
                       "*** Pass \"allow_unsafe\" if you're trusting"
                       " all your (PV) guest kernels. ***\n");
 
+       /* AMD CPUs do not support SYSENTER outside of legacy mode. */
+       clear_bit(X86_FEATURE_SEP, c->x86_capability);
+
+       if (c->x86 == 0x10) {
+               /* do this for boot cpu */
+               if (c == &boot_cpu_data)
+                       check_enable_amd_mmconf_dmi();
+
+               fam10h_check_enable_mmcfg();
+       }
+#endif
+
        if (c->x86 == 0x16 && c->x86_model <= 0xf) {
                if (c == &boot_cpu_data) {
                        l = pci_conf_read32(0, 0, 0x18, 0x3, 0x58);
@@ -555,18 +567,6 @@ static void __devinit init_amd(struct cpuinfo_x86 *c)
                }
        }
 
-       /* AMD CPUs do not support SYSENTER outside of legacy mode. */
-       clear_bit(X86_FEATURE_SEP, c->x86_capability);
-
-       if (c->x86 == 0x10) {
-               /* do this for boot cpu */
-               if (c == &boot_cpu_data)
-                       check_enable_amd_mmconf_dmi();
-
-               fam10h_check_enable_mmcfg();
-       }
-#endif
-
        if (c->x86 == 0x10) {
                /*
                 * On family 10h BIOS may not have properly enabled WC+
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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