[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20171215124726.18525-1-bp@alien8.de>
Date: Fri, 15 Dec 2017 13:47:26 +0100
From: Borislav Petkov <bp@...en8.de>
To: X86 ML <x86@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andy Lutomirsky <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Dave Hansen <dave.hansen@...el.com>,
Greg KH <gregkh@...uxfoundation.org>, keescook@...gle.com,
hughd@...gle.com, Brian Gerst <brgerst@...il.com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Denys Vlasenko <dvlasenk@...hat.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Juergen Gross <jgross@...e.com>,
David Laight <David.Laight@...lab.com>,
Eduardo Valentin <eduval@...zon.com>, aliguori@...zon.com,
Will Deacon <will.deacon@....com>, daniel.gruss@...k.tugraz.at
Subject: [PATCH] x86/fixmap: Set the debugstore fixmap entries on Intel only
From: Borislav Petkov <bp@...e.de>
No need to setup those during boot on !Intel vendors.
Signed-off-by: Borislav Petkov <bp@...e.de>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Andy Lutomirsky <luto@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Dave Hansen <dave.hansen@...el.com>
Cc: Greg KH <gregkh@...uxfoundation.org>
Cc: keescook@...gle.com
Cc: hughd@...gle.com
Cc: Brian Gerst <brgerst@...il.com>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc: Juergen Gross <jgross@...e.com>
Cc: David Laight <David.Laight@...lab.com>
Cc: Eduardo Valentin <eduval@...zon.com>
Cc: aliguori@...zon.com
Cc: Will Deacon <will.deacon@....com>
Cc: daniel.gruss@...k.tugraz.at
---
arch/x86/kernel/cpu/common.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 7b2988e521a7..bca5570d40bc 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -582,12 +582,16 @@ static void __init setup_cpu_entry_area(int cpu)
#ifdef CONFIG_CPU_SUP_INTEL
BUILD_BUG_ON(sizeof(struct debug_store) % PAGE_SIZE != 0);
- set_percpu_fixmap_pages(get_cpu_entry_area_index(cpu, cpu_debug_store),
- &per_cpu(cpu_debug_store, cpu),
- sizeof(struct debug_store) / PAGE_SIZE,
- PAGE_KERNEL);
- set_percpu_fixmap_ptes(get_cpu_entry_area_index(cpu, cpu_debug_buffers),
- sizeof(struct debug_store_buffers) / PAGE_SIZE);
+
+ if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) {
+ set_percpu_fixmap_pages(get_cpu_entry_area_index(cpu, cpu_debug_store),
+ &per_cpu(cpu_debug_store, cpu),
+ sizeof(struct debug_store) / PAGE_SIZE,
+ PAGE_KERNEL);
+
+ set_percpu_fixmap_ptes(get_cpu_entry_area_index(cpu, cpu_debug_buffers),
+ sizeof(struct debug_store_buffers) / PAGE_SIZE);
+ }
#endif
set_percpu_fixmap_ptes(get_cpu_entry_area_index(cpu, ldt_entries),
(LDT_ENTRIES * LDT_ENTRY_SIZE) / PAGE_SIZE);
--
2.13.0
Powered by blists - more mailing lists