* [PATCH] x86/fixmap: Set the debugstore fixmap entries on Intel only
@ 2017-12-15 12:47 Borislav Petkov
0 siblings, 0 replies; only message in thread
From: Borislav Petkov @ 2017-12-15 12:47 UTC (permalink / raw)
To: X86 ML
Cc: LKML, Linus Torvalds, Andy Lutomirsky, Peter Zijlstra,
Dave Hansen, Greg KH, keescook, hughd, Brian Gerst,
Josh Poimboeuf, Denys Vlasenko, Boris Ostrovsky, Juergen Gross,
David Laight, Eduardo Valentin, aliguori, Will Deacon,
daniel.gruss
From: Borislav Petkov <bp@suse.de>
No need to setup those during boot on !Intel vendors.
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andy Lutomirsky <luto@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: keescook@google.com
Cc: hughd@google.com
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: David Laight <David.Laight@aculab.com>
Cc: Eduardo Valentin <eduval@amazon.com>
Cc: aliguori@amazon.com
Cc: Will Deacon <will.deacon@arm.com>
Cc: daniel.gruss@iaik.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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-12-15 12:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-15 12:47 [PATCH] x86/fixmap: Set the debugstore fixmap entries on Intel only Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome