Skip to contentSkip to conversation

x86/AMD: Do not enable ARAT feature on AMD processors below family 0x12

PATCH In review Boris Ostrovsky 2 participants 2 messages Oct 6, 2011 – Oct 7, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/AMD: Do not enable ARAT feature on AMD processors below family 0x12

# HG changeset patch
# User Boris Ostrovsky <[email protected]>
# Date 1317915395 14400
# Node ID 4374a261682e78d6bbf3b3fefb1e779b7a1fc3b3
# Parent 0b66e6450ffe6823d8b323ef4248b38fe7372d54
x86/AMD: Do not enable ARAT feature on AMD processors below family 0x12

Determining whether an AMD processor is affected by erratum 400 may have some corner cases and handling these cases is somewhat complicated. In the interest of simplicity we won't claim ARAT support on processor families below 0x12.

Mirrors Linux commit e9cdd343a5e42c43bcda01e609fa23089e026470

xen/arch/x86/cpu/amd.c +5 -2
diff -r 0b66e6450ffe -r 4374a261682e xen/arch/x86/cpu/amd.c
@@ -495,8 +495,11 @@
 	}
 #endif
 
-	/* As a rule processors have APIC timer running in deep C states */
-	if (c->x86 > 0xf && !cpu_has_amd_erratum(c, AMD_ERRATUM_400))
+	/*
+	 * Family 0x12 and above processors have APIC timer
+	 * running in deep C states.
+	 */
+	if (c->x86 > 0x11)
 		set_bit(X86_FEATURE_ARAT, c->x86_capability);
 
 	if (cpuid_edx(0x80000007) & (1 << 10)) {
#1 lore raw
Quoted 24 lines
Quoted 1 line
Quoted 1 line · Boris Ostrovsky

# HG changeset patch
# User Boris Ostrovsky <[email protected]>
# Date 1317915395 14400
# Node ID 4374a261682e78d6bbf3b3fefb1e779b7a1fc3b3
# Parent 0b66e6450ffe6823d8b323ef4248b38fe7372d54
x86/AMD: Do not enable ARAT feature on AMD processors below family 0x12

Determining whether an AMD processor is affected by erratum 400 may have some corner cases and handling these cases is somewhat complicated. In the interest of simplicity we won't claim ARAT support on processor families below 0x12.

Mirrors Linux commit e9cdd343a5e42c43bcda01e609fa23089e026470

diff -r 0b66e6450ffe -r 4374a261682e xen/arch/x86/cpu/amd.c

xen/arch/x86/cpu/amd.c +0 -0
@@ -495,8 +495,11 @@
 	}
 #endif
 

xen/arch/x86/cpu/amd.c line 505

Quoted 10 lines
xen/arch/x86/cpu/amd.c +5 -2
-	/* As a rule processors have APIC timer running in deep C states */
-	if (c->x86 > 0xf && !cpu_has_amd_erratum(c, AMD_ERRATUM_400))
+	/*
+	 * Family 0x12 and above processors have APIC timer
+	 * running in deep C states.
+	 */
+	if (c->x86 > 0x11)
 		set_bit(X86_FEATURE_ARAT, c->x86_capability);
 
 	if (cpuid_edx(0x80000007) & (1 << 10)) {

Applied, but - couldn't we do away with the erratum 400 definition now? Or is it reasonable to expect that something else could depend on this (which, following the back-and-forth here, seems to be fuzzy anyway)? (I wouldn't mind keeping record of it in the example part of the comment preceding the errata definitions, as is already the case.)

Jan