Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1507494
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/3] x86/CPU: Get rid of show_msr |
| Date | 2016-10-24 19:50 +0200 |
| Message-ID | <svRxL-2mA-5@gated-at.bofh.it> (permalink) |
| References | <svRo5-2jl-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Borislav Petkov <bp@suse.de>
It is useless as it dumps the MSRs too early BUT(!) we do set MSRs later
too.
Also, it dumps only BSP MSRs as it gets called only for CPU 0.
And the MSR range array would need constant updating anyway, and so on
and so on...
Oh, and we have msr.ko and msr-tools which are the much better solution
anyway. So off it goes...
Signed-off-by: Borislav Petkov <bp@suse.de>
---
Documentation/kernel-parameters.txt | 6 -----
arch/x86/kernel/cpu/common.c | 53 -------------------------------------
2 files changed, 59 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 459b301137c2..73de01eb92b6 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -3818,12 +3818,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
shapers= [NET]
Maximal number of shapers.
- show_msr= [x86] show boot-time MSR settings
- Format: { <integer> }
- Show boot-time (BIOS-initialized) MSR settings.
- The parameter means the number of CPUs to show,
- for example 1 means boot CPU only.
-
simeth= [IA-64]
simscsi=
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 1a1d668263b9..f3e7ab29c162 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1162,51 +1162,6 @@ void identify_secondary_cpu(struct cpuinfo_x86 *c)
mtrr_ap_init();
}
-struct msr_range {
- unsigned min;
- unsigned max;
-};
-
-static const struct msr_range msr_range_array[] = {
- { 0x00000000, 0x00000418},
- { 0xc0000000, 0xc000040b},
- { 0xc0010000, 0xc0010142},
- { 0xc0011000, 0xc001103b},
-};
-
-static void __print_cpu_msr(void)
-{
- unsigned index_min, index_max;
- unsigned index;
- u64 val;
- int i;
-
- for (i = 0; i < ARRAY_SIZE(msr_range_array); i++) {
- index_min = msr_range_array[i].min;
- index_max = msr_range_array[i].max;
-
- for (index = index_min; index < index_max; index++) {
- if (rdmsrl_safe(index, &val))
- continue;
- pr_info(" MSR%08x: %016llx\n", index, val);
- }
- }
-}
-
-static int show_msr;
-
-static __init int setup_show_msr(char *arg)
-{
- int num;
-
- get_option(&arg, &num);
-
- if (num > 0)
- show_msr = num;
- return 1;
-}
-__setup("show_msr=", setup_show_msr);
-
static __init int setup_noclflush(char *arg)
{
setup_clear_cpu_cap(X86_FEATURE_CLFLUSH);
@@ -1240,14 +1195,6 @@ void print_cpu_info(struct cpuinfo_x86 *c)
pr_cont(", stepping: 0x%x)\n", c->x86_mask);
else
pr_cont(")\n");
-
- print_cpu_msr(c);
-}
-
-void print_cpu_msr(struct cpuinfo_x86 *c)
-{
- if (c->cpu_index < show_msr)
- __print_cpu_msr();
}
static __init int setup_disablecpuid(char *arg)
--
2.10.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] x86/CPU: Get rid of show_msr Borislav Petkov <bp@alien8.de> - 2016-10-24 19:50 +0200
[PATCH 3/3] x86/CPU: Get rid of show_msr Borislav Petkov <bp@alien8.de> - 2016-10-24 19:50 +0200
[tip:x86/cpu] x86/cpu: Get rid of the show_msr= boot option tip-bot for Borislav Petkov <tipbot@zytor.com> - 2016-10-25 12:40 +0200
Re: [tip:x86/cpu] x86/cpu: Get rid of the show_msr= boot option Yinghai Lu <yinghai@kernel.org> - 2016-10-27 00:30 +0200
[PATCH 2/3] x86/CPU: Merge bugs.c and bugs_64.c Borislav Petkov <bp@alien8.de> - 2016-10-24 19:50 +0200
[tip:x86/cpu] x86/cpu: Merge bugs.c and bugs_64.c tip-bot for Borislav Petkov <tipbot@zytor.com> - 2016-10-25 12:40 +0200
csiph-web