From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935817AbcJUVvs (ORCPT ); Fri, 21 Oct 2016 17:51:48 -0400 Received: from smtp3.openmailbox.org ([62.4.1.37]:47330 "EHLO smtp3.openmailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934400AbcJUVvp (ORCPT ); Fri, 21 Oct 2016 17:51:45 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 22 Oct 2016 00:51:32 +0300 From: sonofagun@openmailbox.org To: Borislav Petkov Cc: linux-kernel@vger.kernel.org, Nikos Barkas Subject: Re: [PATCH] x86/AMD: Apply erratum 688 on machines without a BIOS fix In-Reply-To: <20161021164723.c5rh7kgulba2aq6i@pd.tnic> References: <20161021164723.c5rh7kgulba2aq6i@pd.tnic> Message-ID: User-Agent: Roundcube Webmail/1.0.6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thank you for your time! I have chosen reply to list and all recipients, it must work now. My brother rejected the proposed patch because it does not provide equivalent functionality with the original. Our initial patch would fix 3 broken models and 1 working model. Your patch will only work for 1 model. Only machines having our APU will be fixed. All B0 APUs will be unpatched. This is not right. Check the revision guide to verify that. To avoid unneeded complexity we propose this patch as V2, do you agree? +#define MSR_AMD64_IC_CFG 0xC0011021 + +static void init_amd_on(struct cpuinfo_x86 *c) +{ + /* + * Apply erratum 688 fix so machines without a BIOS + * fix work. + */ + + u32 val = pci_read_config(0, 0x18, 0x4, 0x164); + + if (!(val & BIT(2))) { + msr_set_bit(MSR_AMD64_IC_CFG, 3); + msr_set_bit(MSR_AMD64_IC_CFG, 14); +} static void init_amd_bd(struct cpuinfo_x86 *c) { u64 value; @@ -738,6 +750,7 @@ static void init_amd(struct cpuinfo_x86 case 0xf: init_amd_k8(c); break; case 0x10: init_amd_gh(c); break; case 0x12: init_amd_ln(c); break; + case 0x14: init_amd_on(c); break; case 0x15: init_amd_bd(c); break; } Please advice to proceed! > Why, what's wrong with that one? That one should be all fixed! :-) > > I have such box too and it runs fine. erratum 721 :-(