From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1947496AbdDYNFy (ORCPT ); Tue, 25 Apr 2017 09:05:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49340 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1947296AbdDYNFt (ORCPT ); Tue, 25 Apr 2017 09:05:49 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4E8A86264E Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dvlasenk@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4E8A86264E Subject: Re: [PATCH] x86, msr: Better document AMD "tweak MSRs", rename MSR_F15H_IC_CFG To: Borislav Petkov References: <20170425114541.8267-1-dvlasenk@redhat.com> <20170425115948.6hekn2xklodjil7e@pd.tnic> <785f402c-a830-1d23-545e-289fb14a84a8@redhat.com> <20170425125913.5nnd436dz54q7cld@pd.tnic> Cc: Ingo Molnar , Andy Lutomirski , Brian Gerst , Peter Zijlstra , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org From: Denys Vlasenko Message-ID: <5ef2c044-3044-4983-61d7-68f651dd8ee9@redhat.com> Date: Tue, 25 Apr 2017 15:05:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170425125913.5nnd436dz54q7cld@pd.tnic> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 25 Apr 2017 13:05:48 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/25/2017 02:59 PM, Borislav Petkov wrote: > On Tue, Apr 25, 2017 at 02:16:55PM +0200, Denys Vlasenko wrote: >> However, all IBS registers are in this range. > > I knew you were gonna say that. But IBS registers are architectural too > in the sense that they are behind a CPUID bit. > >> DRi_ADDR_MASK are in this range - and these are very useful, likely to >> stay. > > Those are too behind a CPUID bit. > >> In the arch/x86/include/asm/msr-index.h file we already have >> three "tweak" MSRs defined with "AMD64": >> >> #define MSR_AMD64_LS_CFG 0xc0011020 >> #define MSR_AMD64_DC_CFG 0xc0011022 >> #define MSR_AMD64_BU_CFG2 0xc001102a >> >> I just noticed that we have a fourth one in >> arch/x86/kernel/cpu/amd.c: >> >> #define MSR_AMD64_DE_CFG 0xC0011029 > > That's wrong. I think we should call those something else but not > "AMD64". Okay. Propose a naming scheme for these which looks god to you. > Perhaps the families for which the workaround is being applied. > In the last case, MSR_F12H_DE_CFG, for example. And yes, I should've > paid attention to that but ... A bit problematic: MSR C001_1020 is used (mentioned in Rev Guides as a possible way to work around an errata) by all Fams starting from K8, except Fam15h. MSR C001_1022 is used by K8, 10h, 15h. Etc...