Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1630490

Re: [PATCH] x86, msr: Better document AMD "tweak MSRs", rename MSR_F15H_IC_CFG

From Borislav Petkov <bp@alien8.de>
Newsgroups linux.kernel
Subject Re: [PATCH] x86, msr: Better document AMD "tweak MSRs", rename MSR_F15H_IC_CFG
Date 2017-04-25 15:20 +0200
Message-ID <tA8xP-5bb-1@gated-at.bofh.it> (permalink)
References <tA78J-4b3-1@gated-at.bofh.it> <tA7s5-4xl-1@gated-at.bofh.it> <tA7BL-4B0-5@gated-at.bofh.it> <tA8et-4Pu-9@gated-at.bofh.it> <tA8oa-57M-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Apr 25, 2017 at 03:05:41PM +0200, Denys Vlasenko wrote:
> Okay. Propose a naming scheme for these which looks god to you.

MSR_AMD64_LS_CFG  -> MSR_F16H_LS_CFG
MSR_AMD64_DC_CFG  -> MSR_F10H_DC_CFG
MSR_AMD64_BU_CFG2 -> MSR_F10H_BU_CFG2
MSR_AMD64_DE_CFG  -> MSR_F12H_DE_CFG

and please move that last one to msr-index.h while you're at it as we
want to keep all msrs in a single file.

I know, there's a hint not to do that at the beginning of
arch/x86/include/asm/msr-index.h but tip guys prefer all MSRs in one
place.

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

Right, so here the logic should be something like this: If a family has
a LS_CFG MSR, then it gets a define with the family in it. If another
family uses the same MSR number, we do:

#define MSR_F16H_LS_CFG			0xc0011020
#define MSR_K8_LS_CFG			MSR_F16H_LS_CFG

to denote exactly that - those two families happen to share the same
MSR. But it is not guaranteed that future families will have that same
one. And if they do, they can define it, if needed.

This way, the code mirrors the situation exactly.

Thanks.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] x86, msr: Better document AMD "tweak MSRs", rename MSR_F15H_IC_CFG Denys Vlasenko <dvlasenk@redhat.com> - 2017-04-25 13:50 +0200
  Re: [PATCH] x86, msr: Better document AMD "tweak MSRs", rename  MSR_F15H_IC_CFG Borislav Petkov <bp@alien8.de> - 2017-04-25 14:10 +0200
    Re: [PATCH] x86, msr: Better document AMD "tweak MSRs", rename  MSR_F15H_IC_CFG Denys Vlasenko <dvlasenk@redhat.com> - 2017-04-25 14:20 +0200
      Re: [PATCH] x86, msr: Better document AMD "tweak MSRs", rename  MSR_F15H_IC_CFG Borislav Petkov <bp@alien8.de> - 2017-04-25 15:00 +0200
        Re: [PATCH] x86, msr: Better document AMD "tweak MSRs", rename  MSR_F15H_IC_CFG Denys Vlasenko <dvlasenk@redhat.com> - 2017-04-25 15:10 +0200
          Re: [PATCH] x86, msr: Better document AMD "tweak MSRs", rename  MSR_F15H_IC_CFG Borislav Petkov <bp@alien8.de> - 2017-04-25 15:20 +0200

csiph-web