aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/amd.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu/amd.c')
-rw-r--r--arch/x86/kernel/cpu/amd.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index dd4a5b685a00..721ef3208eb5 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -698,13 +698,11 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
698 if (c->x86 > 0x11) 698 if (c->x86 > 0x11)
699 set_cpu_cap(c, X86_FEATURE_ARAT); 699 set_cpu_cap(c, X86_FEATURE_ARAT);
700 700
701 /*
702 * Disable GART TLB Walk Errors on Fam10h. We do this here
703 * because this is always needed when GART is enabled, even in a
704 * kernel which has no MCE support built in.
705 */
706 if (c->x86 == 0x10) { 701 if (c->x86 == 0x10) {
707 /* 702 /*
703 * Disable GART TLB Walk Errors on Fam10h. We do this here
704 * because this is always needed when GART is enabled, even in a
705 * kernel which has no MCE support built in.
708 * BIOS should disable GartTlbWlk Errors themself. If 706 * BIOS should disable GartTlbWlk Errors themself. If
709 * it doesn't do it here as suggested by the BKDG. 707 * it doesn't do it here as suggested by the BKDG.
710 * 708 *
@@ -718,6 +716,19 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
718 mask |= (1 << 10); 716 mask |= (1 << 10);
719 wrmsrl_safe(MSR_AMD64_MCx_MASK(4), mask); 717 wrmsrl_safe(MSR_AMD64_MCx_MASK(4), mask);
720 } 718 }
719
720 /*
721 * On family 10h BIOS may not have properly enabled WC+ support,
722 * causing it to be converted to CD memtype. This may result in
723 * performance degradation for certain nested-paging guests.
724 * Prevent this conversion by clearing bit 24 in
725 * MSR_AMD64_BU_CFG2.
726 */
727 if (c->x86 == 0x10) {
728 rdmsrl(MSR_AMD64_BU_CFG2, value);
729 value &= ~(1ULL << 24);
730 wrmsrl(MSR_AMD64_BU_CFG2, value);
731 }
721 } 732 }
722 733
723 rdmsr_safe(MSR_AMD64_PATCH_LEVEL, &c->microcode, &dummy); 734 rdmsr_safe(MSR_AMD64_PATCH_LEVEL, &c->microcode, &dummy);