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

[Xen-changelog] [xen-unstable] x86/amd: re-enable CPU topology extensions in case BIOS has disabled it


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Thu, 31 May 2012 22:22:07 +0000
  • Delivery-date: Thu, 31 May 2012 22:22:18 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Andreas Herrmann <andreas.herrmann3@xxxxxxx>
# Date 1338452142 -7200
# Node ID d7ae665b03afb88a813c6f197612215697eaf8f6
# Parent  a120d24f90fb5e94244331e530aacf5b0ea86f25
x86/amd: re-enable CPU topology extensions in case BIOS has disabled it

BIOS will switch off the corresponding feature flag on family
15h models 10h-1fh non-desktop CPUs.

The topology extension CPUID leafs are required to detect which
cores belong to the same compute unit. (thread siblings mask is
set accordingly and also correct information about L1i and L2
cache sharing depends on this).

W/o this patch we wouldn't see which cores belong to the same
compute unit and also cache sharing information for L1i and L2
would be incorrect on such systems.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@xxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
Committed-by: Jan Beulich <jbeulich@xxxxxxxx>
---


diff -r a120d24f90fb -r d7ae665b03af xen/arch/x86/cpu/amd.c
--- a/xen/arch/x86/cpu/amd.c    Wed May 30 13:25:51 2012 +0100
+++ b/xen/arch/x86/cpu/amd.c    Thu May 31 10:15:42 2012 +0200
@@ -471,6 +471,21 @@ static void __devinit init_amd(struct cp
                }
        }
 
+       /* re-enable TopologyExtensions if switched off by BIOS */
+       if ((c->x86 == 0x15) &&
+           (c->x86_model >= 0x10) && (c->x86_model <= 0x1f) &&
+           !cpu_has(c, X86_FEATURE_TOPOEXT) &&
+           !rdmsr_safe(MSR_K8_EXT_FEATURE_MASK, value)) {
+               value |= 1ULL << 54;
+               wrmsr_safe(MSR_K8_EXT_FEATURE_MASK, value);
+               rdmsrl(MSR_K8_EXT_FEATURE_MASK, value);
+               if (value & (1ULL << 54)) {
+                       set_bit(X86_FEATURE_TOPOEXT, c->x86_capability);
+                       printk(KERN_INFO "CPU: Re-enabling disabled "
+                              "Topology Extensions Support\n");
+               }
+       }
+
         amd_get_topology(c);
 
        /* Pointless to use MWAIT on Family10 as it does not deep sleep. */

_______________________________________________
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®.